Part Number Hot Search : 
2500E GM004 EF9367C SY89825U TP216 30006 W27E040 EG21SR
Product Description
Full Text Search
 

To Download XR20M1280 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  exar corporation 48720 kato road, fremont ca, 94538 ? (510) 668-7000 ? fax (510) 668-7017 ? www.exar.com XR20M1280 i2c/spi uart with 128-byte fifo and integrated level shifters may 2011 rev. 1.0.0 general description the XR20M1280 1 (m1280) is a single-channel i 2 c/ spi universal asynchronous receiver and transmitter (uart) with integrated level shifters and 128 bytes of transmit and receive fifos. for flexibility in a mixed voltage environment, the m1280 has 4 vcc pins. there is a vcc pin for the core, a vcc pin for the uart signals, a vcc pin for the cpu interface signals and a vcc pin for the gpio signals. the vcc pins for the uart, gpio and i 2 c/spi interface signals allow for the m1280 to interface with devices operat ing at different voltage levels eliminating the need for external voltage level shifters. the vcc pin for the core voltage helps lower the overall power consumption of applications that use slower data rates. the auto rs-485 half-duplex direction control feature simplifies both the hardware and software for half-duplex rs-485 applications. in addition, the multidrop mode with auto address detection and address byte control features increase the performance by simplifying the software routines. the independent tx/rx baud rate generator feature allows the transmitter and receiver to operate at different baud rates. in addition, the fractional baud rate generator featur e provides flexibility for crystal/clock frequencies for generating standard and non-standard baud rates. the m1280 has programmable transmit and receive fifo trigger levels , automatic hardware and software flow control, and data rates of up to 24 mbps. power consumption of the m1280 can be minimized by enabling the sleep mode. the m1280 has a 16550 compatible register set that provide users with operating status and control, receiver error indications, and modem serial interface controls. an internal lo opback capability allows onboard diagnostics. the m1280 has a selectable i 2 c/spi bus interface. n ote : 1 covered by u.s. patent #5,649,122. features ? integrated level shifters on cpu interface, uart and gpio signals ? selectable i 2 c/spi bus interface ? 26mhz maximum spi clock ? 24mbps maximum uart data rate ? up to 16 gpios ? 128-bytes tx and rx fifos ? programmable tx/rx trigger levels ? tx/rx fifo level counters ? independent tx/rx baud rate generator ? fractional baud rate generator ? auto rts/cts hardware flow control ? auto xon/xoff software flow control ? auto rs-485 half-duple x direction control ? multidrop mode w/ auto address detect (rx) ? multidrop mode w/ addr ess byte control (tx) ? sleep mode with automatic wake-up ? infrared (irda 1.0 and 1.1) mode ? 1.62v to 3.63v supply operation ? 5v tolerant inputs ? crystal oscillator or external clock input applications ? personal digital assistants (pda) ? cellular phones/data devices ? battery-operated devices ? global positioning system (gps) ? bluetooth
XR20M1280 2 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 f igure 1. XR20M1280 b lock d iagram vcc_core i 2 c/ spi bus interface vcc_bus vcc_uart uart regs 128-byte tx fifo 128-byte rx fifo tx rx xtal1 xtal2 1.62v- 3.63v i/o buffers flow control a0/cs# a1/si sck irq# reset# sda so i2c/spi# en485# enir# 1.62v- 3.63v i/o buffers fractional brg crystal oscillator/ buffer gpios tx rx rts# 1.62v- 3.63v i/o buffers cts# gpio[3:0] gpio[15:4] vcc_gpio sleep/pwrdn# ordering information p art n umber p ackage n umber o f gpio s o perating t emperature r ange d evice s tatus XR20M1280il24-f qfn-24 4 -40c to +85c active XR20M1280il24tr-f qfn-24 4 -40c to +85c active XR20M1280il32-f qfn-32 8 -40c to +85c active XR20M1280il32tr-f qfn-32 8 -40c to +85c active XR20M1280il40-f qfn-40 16 -40c to +85c active XR20M1280il40tr-f qfn-40 16 -40c to +85c active n ote : tr = tape and reel, f = green / rohs
f igure 2. p in o ut a ssignments i2c/spi# enir# nc sda scl irq# a1 a0 nc reset# XR20M1280il40 i 2 c mode ri#/gpio3 gnd vcc_uart gpio15 gpio14 gpio13 gpio4 gpio5 gpio6 gpio7 sleep/pwrdn# en485# gnd vcc_bus gpio8 gpio9 gpio10 gpio11 gpio12 vcc_gpio xtal2 xtal1 vcc_core rx tx rts# cts# dtr#/gpio0 dsr#/gpio1 cd#/gpio2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 30 29 28 27 26 25 24 23 22 21 40 39 38 37 36 35 34 33 32 31 vcc_bus i2c/spi# enir# so gnd scl irq# si cs# nc reset# XR20M1280il40 spi mode ri#/gpio3 gnd vcc_uart gpio15 gpio14 gpio13 gpio4 gpio5 gpio6 gpio7 sleep/pwrdn# en485# gnd vcc_bus gpio8 gpio9 gpio10 gpio11 gpio12 vcc_gpio xtal2 xtal1 vcc_core rx tx rts# cts# dtr#/gpio0 dsr#/gpio1 cd#/gpio2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 30 29 28 27 26 25 24 23 22 21 40 39 38 37 36 35 34 33 32 31 gnd i2c/spi# enir# nc sda scl irq# a1 a0 XR20M1280il32 i 2 c mode dsr#/gpio1 cd#/gpio2 ri#/gpio3 vcc_uart gpio4 gpio5 gpio6 gpio7 reset# sleep/pwrdn# en485# gnd vcc_bus nc nc vcc_gpio xtal2 xtal1 vcc_core rx tx rts# cts# dtr#/gpio0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 24 23 22 21 20 19 18 17 32 31 30 29 28 27 26 25 vcc_bus i2c/spi# enir# so gnd scl irq# si cs# XR20M1280il32 spi mode dsr#/gpio1 cd#/gpio2 ri#/gpio3 vcc_uart gpio4 gpio5 gpio6 gpio7 reset# sleep/pwrdn# en485# gnd vcc_bus nc nc vcc_gpio xtal2 xtal1 vcc_core rx tx rts# cts# dtr#/gpio0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 24 23 22 21 20 19 18 17 32 31 30 29 28 27 26 25 gnd nc sda scl irq# a1 a0 XR20M1280 il24 i 2 c mode cd#/gpio2 ri#/gpio3 vcc_uart rts# rx tx reset# s leep/pwrdn# gnd vcc_bus en485# cts# i2c/spi# xtal2 xtal1 vcc_core dtr#/gpio0 dsr#/gpio1 1 2 3 4 5 6 7 8 9 10 11 12 18 17 16 15 14 13 24 23 22 21 20 19 vcc_bus so gnd scl irq# si cs# XR20M1280 il24 spi mode cd#/gpio2 ri#/gpio3 vcc_uart rts# rx tx reset# sleep/pwrdn# gnd vcc_bus en485# cts# i2c/spi# xtal2 xtal1 vcc_core dtr#/gpio0 dsr#/gpio1 1 2 3 4 5 6 7 8 9 10 11 12 18 17 16 15 14 13 24 23 22 21 20 19 gnd XR20M1280 3 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters
XR20M1280 4 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 pin descriptions pin description n ame qfn-24 p in # qfn-32 pin# qfn-40 pin# t ype d escription i2c (spi) interface i2c/spi# 24 1 1 i i 2 c-bus or spi interface select. i 2 c-bus interface is selected if this pin is high. spi interface is selected if this pin is low sda (gnd) 2 4 4 i/o i 2 c-bus data input/output (open-drai n). if spi configuration is selected, then this pin should be tied low. scl 3 5 5 i i 2 c-bus or spi serial input clock. when the i 2 c-bus interface is selected, t he serial clock idles high. when the spi interface is select ed, the serial clock idles low. irq# 4 6 6 od interrupt output (open-drain, active low). a0 (cs#) 6 8 8 i i 2 c-bus device address select a0 or spi chip select. if i 2 c-bus con - figuration is selected, this pin along with the a1 pin allows user to change the device?s base address. if spi configuration is selected, this pin is the spi chip select pin (schmitt-trigger, active low). a1 (si) 5 7 7 i i 2 c-bus device address select a1 or spi data input pin. if i 2 c-bus configuration is selected, this pin along with a0 pin allows user to change the device?s base address. if spi configuration is selected, this pin is the spi data input pin. so (nc) 1 3 3 o spi data output pin. if i2c-bus co nfiguration is selected, this pin must be left unconnected. reset# 7 9 10 i reset (active low) - a longer than 40 ns low pulse on this pin will reset the internal registers and all outputs. the uart transmitter output will be idle and the receiver input will be ignored. modem i/o and gpios tx 13 28 36 o uart transmit data or infrared encoder data. standard transmit and receive interface is enabled when mcr[6] = 0. in this mode, the tx signal will be a logic 1 during reset or idle (no data). infrared irda transmit and receive interfac e is enabled when mcr[6] = 1. in the infrared mode, the inactive state (no data) for the infrared encoder/decoder interface is a logic 0. if it is not used, leave it unconnected. rx 14 29 37 i uart receive data or infrared receive data. normal receive data input must idle at logic 1 conditio n. the infrared receiver idles at logic 0. this input should be connected to vcc when not used. rts# 15 27 35 o uart request-to-send (active low) or general purpose output. this output must be asserted prior to using auto rts flow control, see efr[6], mcr[1] and ier[6]. cts# 12 26 34 i uart clear-to-send (active low) or general purpose input. it can be used for auto cts flow control, see efr[7], msr[4] and ier[7]. this input should be connected to vcc when not used. gpio0/dtr# 20 25 33 i/o general purpose i/o or uart data-terminal-ready (active low). gpio1/dsr# 19 24 32 i/o general purpose i/o or uart data-set-ready (active low).
XR20M1280 5 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters gpio2/cd# 18 23 31 i/o general purpose i/o or uart carrier-detect (active low). gpio3/ri# 17 22 30 i/o general purpose i/o or uart ring-indicator (active low). gpio4 gpio5 gpio6 gpio7 - - - - 20 19 18 17 24 23 22 21 i/o i/o i/o i/o general purpose i/os. gpio8 gpio9 gpio10 gpio11 gpio12 gpio13 gpio14 gpio15 - - - - - - - - - - - - - - - - 15 16 17 18 19 25 26 27 i/o i/o i/o i/o i/o i/o i/o i/o general purpose i/os. ancillary signals xtal1 22 31 39 i crystal or external clock input. no te: this input is not 5v tolerant. xtal2 23 32 40 o crystal or buffered clock output. en485# 11 11 12 i enable auto rs-485 half-duplex mode. this pin is sampled upon power-up. if this pin is high, th en the rts# output can be used for auto rts hardware flow control or as a general purpose output. if this pin is low, then the rts# output is the auto rs-485 half- duplex direction control pin. enir# - 2 2 i enable ir mode. this pin is sampled upon power-up. if this pin is high, then the tx output and rx input will behave as the uart transmit data output and uart receive data input. if this pin is low, then the tx output and rx in put will behave as the infrared encoder data output and the infrared receive data input. sleep/ pwrdn# 8 10 11 i/o sleep / power down pin. this pin powers up as the sleep input. the sleep input can force the uart to enter into the sleep mode after the next byte transmitted or received without meeting any of the sleep mode conditions. this pin can also be configured as an output pin which can be used to indicate to the cpu that the uart has entered the sleep mode. this output can also be used to power down other devices. vcc_core 21 30 38 pwr 1.62v to 3.63v vcc for the core. this supply voltage is used for the core logic including the crystal oscillator circuit. vcc_bus 10 13 14 pwr 1.62v to 3.63v vcc for bus interface signals. this supply voltage pin will determi ne the i/o levels of the cpu bus interface signals. vcc_uart 16 21 28 pwr 1.62v to 3.63v vcc for the uart signals. this supply voltage pin will determine the i/o levels of the uart i/o signals including gpio[3:0]. pin description n ame qfn-24 p in # qfn-32 pin# qfn-40 pin# t ype d escription
XR20M1280 6 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 pin type: i=input, o=output, i/o= input/output, od=output open drain. vcc_gpio - 16 20 pwr 1.62v to 3.63v vcc for the gpio signals. this supply voltage pin will determine the i/o levels of the gpio[15:4] signals. gnd 9 12 13, 29 pwr power supply common, ground. gnd center pad center pad center pad pwr the center pad on the backside of the qfn package is metallic and should be connected to gnd on the pcb. the thermal pad size on the pcb should be the approximate size of this center pad and should be solder mask defined. the solder mask opening should be at least 0.0025" inwards from the edge of the pcb thermal pad. pin description n ame qfn-24 p in # qfn-32 pin# qfn-40 pin# t ype d escription
XR20M1280 7 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters 1.0 functional descriptions 1.1 cpu interface the XR20M1280 can operate with either an i 2 c-bus interface or an spi interface. the cpu interface is selected via the i2c/spi# input pin. 1.1.1 i 2 c-bus interface the i 2 c-bus interface is compliant with the standard-mode and fast-mode i 2 c-bus specifications. the i 2 c-bus interface consists of two lines: serial data (sda) and serial clock (scl). in the standard-mode, the serial clock and serial data can go up to 100 kbps and in the fast-mode, the serial clock and serial data can go up to 400 kbps. the first byte sent by an i 2 c-bus master contains a start bit (sda transition from high to low when scl is high), 7-bit slave address and whether it is a read or write tran saction. the next byte is the sub- address that contains the address of the register to access. the XR20M1280 responds to each write with an acknowledge (sda driven low by XR20M1280 for one clock cycle when scl is high). if the tx fifo is full, the XR20M1280 will respond with a ne gative acknowledge (sda driven high by XR20M1280 for one clock cycle when scl is high) when the cpu tries to write to the tx fifo . the last byte sent by an i 2 c-bus master contains a stop bit (sda transition from low to high when scl is high). see figures 3 - 5 below. for complete details, see the i 2 c-bus specifications. f igure 3. i c s tart and s top c onditions sda scl s p start condition stop condition f igure 4. m aster w rites t o s lave (XR20M1280) sw a a ap slave address register address ndata white block: host to uart grey block: uart to host f igure 5. m aster r eads f rom s lave (XR20M1280) sw a ar slave address register address white block: host to uart grey block: uart to host a s slave address ndata anap last data 2
XR20M1280 8 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 1.1.2 i 2 c-bus addressing there could be many devices on the i 2 c-bus. to distinguish itself from the other devices on the i 2 c-bus, there are eight possible slave addresses that can be select ed for the XR20M1280 using the a1 and a0 address lines. table 1 below shows the different addresses that can be selected. note that there are two different ways to select each i2c address. t able 1: XR20M1280 i c a ddress m ap c a ddress vcc vcc 0x60 (0110 000x) vcc gnd 0x62 (0110 001x) vcc scl 0x64 (0110 010x) vcc sda 0x66 (0110 011x) gnd vcc 0x68 (0110 100x) gnd gnd 0x6a (0110 101x) gnd scl 0x6c (0110 110x) gnd sda 0x6e (0110 111x) scl vcc 0x60 (0110 000x) scl gnd 0x62 (0110 001x) scl scl 0x64 (0110 010x) scl sda 0x66 (0110 011x) sda vcc 0x68 (0110 100x) sda gnd 0x6a (0110 101x) sda scl 0x6c (0110 110x) sda sda 0x6e (0110 111x) an i 2 c sub-address is sent by the i 2 c master following the slave address. the sub-address contains the uart register address being accessed. a read or wr ite transaction is determin ed by bit-0 of the slave address. if bit-0 is?0?, then it is a write transaction. if bit- 0 is ?1?, then it is a read tr ansaction. if bit-0 is a logic 1, then it is a read transaction. table 2 below lists the functions of the bits in the i 2 c sub-address. t able 2: i c s ub -a ddress (r egister a ddress ) b it f unction 7:6 reserved 5:3 uart internal register address a2:a0 2:1 uart channel select ?00? = uart channel, other values are reserved 0 reserved after the last read or write transaction, the i 2 c-bus master will set the scl signal back to its idle state (high). 2 a1 a0 i 2 2
XR20M1280 9 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters 1.1.3 spi bus interface the spi interface consists of four lines: serial clock (scl ), chip select (cs#), slave output (so) and slave input (si). the serial clock, slave output and slave input can be as fast as 26 mbps. to access the device in the spi mode, the cs# signal for the XR20M1280 is asserted by the spi master, then the spi master starts toggling the scl signal with the appropriate transaction informati on. the first bit sent by the spi master includes whether it is a read or write transaction and the uart register being accessed. see table 3 below. t able 3: spi f irst b yte f ormat b it f unction 7 read/write# logic 1 = read logic 0 = write 6 reserved 5:3 uart internal register address a2:a0 2:1 uart channel select ?00? = uart channel, other values are reserved 0 reserved f igure 6. spi w rite r/w?0? a2a1a0 ?0? ?0? x d7d6d5d4d3d2d1d0 scl si f igure 7. spi r ead r/w ?0? a2 a1 a0 ?0? ?0? x d7 d6 d5 d4 d3 d2 d1 d0 scl si so
XR20M1280 10 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 the 128 byte tx fifo can be loaded with data or 128 byte rx fifo data can be unloaded in one spi write or read sequence. f igure 8. spi fifo w rite r/w?0? a2a1a0 ?0? ?0? x d7d6d5d4d3d2d1d0d7d6d5d4d3d2d1d0 scl si last bit f igure 9. spi fifo r ead scl d7 d6 d5 d4 d3 d2 d1 d0 d7 d6 d5 d4 d3 d2 d1 d0 last bit r/w ?0? a2 a1 a0 ?0? ?0? x si so after the last read or writ e transaction, the spi master will set the scl signal back to its idle state (low).
XR20M1280 11 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters 1.2 serial interface the m1280 is typically used with rs-232, rs-485 an d ir transceivers. the following figure shows typical connections from the uart to the different transceivers. for more information on rs-232 and rs-485/422 transceivers, go to www.exar.com or send an e-mail to uarttechsupport@exar.com. f igure 10. XR20M1280 t ypical s erial i nterface c onnections vcc_uart vcc_uart rs-485 full-duplex serial interface gnd cd # dsr# cts# dtr# rts# rx tx di ro uart rs-485 transceiver full-duplex tx+ tx- rx+ rx- ri # nc nc vcc_uart de re# vcc_uart vcc_uart vcc_uart rs-232 full-modem serial interface gnd ri# cd# dsr# cts# rts# dtr# rx tx t1in r1out t2in t3in r2out r3out r4out r5out gnd uart rs-232 transceiver
f igure 11. XR20M1280 t ypical s erial i nterface c onnections vcc_uart vcc_uart rs-485 half-duplex serial interface gnd cd # dsr# cts# dtr# rts# rx tx di ro uart rs-485 transceiver half-duplex y z a b ri # nc vcc_uart de re# vcc_uart vcc_uart infrared connection gnd ri# cd# dsr# cts# rts# dtr# rx tx txd rxd uart ir transceiver vcc_uart nc nc XR20M1280 12 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0
XR20M1280 13 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters 1.3 device reset the reset# input resets the internal register s and the serial interface output s to their defa ult state (see table 21 ). an active low pulse of longer than 40 ns duration will be required to activate the reset function in the device. following a power-on reset or an external re set, the m1280 is software compatible with previous generation of uarts. 1.4 5-volt tolerant inputs the m1280 can accept and withstand 5v signals on the inputs without any dama ge. but note that if the supply voltage for the m1280 is at the lower end of the supply voltage range (ie. 1.8v), its v oh may not be high enough to meet the requirements of the v ih of a cpu or a serial transceiver that is operating at 5v. caution: xtal1 is not 5 volt tolerant. 1.5 internal registers the m1280 has a set of 16550 compatib le registers for controlling, monito ring and data loading and unloading. these registers function as data holding registers (thr/r hr), interrupt status and co ntrol registers (isr/ier), a fifo control register (fcr), receive line status and control registers (lsr/lcr), modem status and control registers (msr/mcr), programmable data rate (clock) divi sor registers (dll/dlm/dld), and a user accessible scratchpad register (spr). beyond the general 16c550 f eatures and capabilities, the m1280 offe rs enhanced featur e registers (efr, xon1/xoff1, xon2/xoff2, dld, fctr, emsr, fc an d trig, sfr, shr, gpioint, gpio3t, gpioinv, gpiosel) that provide automatic rts and cts hardware flow control, automatic xon/xoff software flow control, 9-bit (multidrop) mode, auto rs-485 half duple x control, different baud rate for tx and rx and fractional baud rate generator. all the register functions are discussed in full detail later in ?section 2.0, uart internal registers? on page 27 . 1.6 irq# ouput the irq# interrupt output changes according to th e operating mode and enhanced features setup. table 4 and 5 summarize the operating behavior for the transmitter and receiver. also see figure 33 through 35 . t able 4: irq# p in o peration for t ransmitter auto rs485 mode fcr b it -0 = 0 (fifo d isabled ) fcr b it -0 = 1 (fifo e nabled ) irq# pin no high = one byte in thr low = thr empty high = fifo above trigger level low = fifo below trigger level or fifo empty irq# pin yes high = one byte in thr low = thr empty high = fifo above trigger level low = fifo below trigger level or fifo empty t able 5: irq# p in o peration for r eceiver fcr b it -0 = 0 (fifo d isabled ) fcr b it -0 = 1 (fifo e nabled ) irq# pin high = one byte in thr low = rhr empty high = fifo above trigger level low = fifo above trigger level or rx data timeout
XR20M1280 14 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 1.7 crystal oscillator or external clock input the m1280 includes an on-chip oscillator to produce a clock for th e baud rate generators in the device when a crystal is connected between xtal1 and xtal2 as shown below. the cpu data bus does not require this clock for bus operation. the crystal oscillator provid es a system clock to the baud rate generators (brgs) in the uart. xtal1 is the input to the oscillator or external clock buffer input with xtal2 pin be ing the output. for programming details, see ?section 1.8, programmable baud rate generator with fractional divisor? on page 15 . f igure 12. t ypical c rystal c onnections c1 22-47pf c2 22-47pf y1 1.8432 mhz to 24 mhz r1 0-120 (optional) r2 500k - 1m xtal1 xtal2 the on-chip oscillator is designed to use an industry standard micropro cessor crystal (p arallel resonant, fundamental frequency with 10-22 pf capacitance load, esr of 20-120 ohms and 100ppm frequency tolerance) connec ted externally be tween the xtal1 and xtal2 pins. typical oscillator connections are shown in figure 12 . alternatively, an external clock can be connected to the xtal1 pin to clock the internal baud rate generator for st andard or custom rates. for fu rther reading on oscillator circui t, see applicati on note dan108 on exar?s web site.
XR20M1280 15 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters 1.8 programmable baud rate generator with fractional divisor the m1280 has independent baud rate generators (brgs) with prescalers for the transmitter and receiver. the prescalers are controlled by a software bit in the m cr register. the mcr register bit-7 sets the prescalers to divide the input crystal or external clock by 1 or 4. the output of the prescaler clocks to the brg. the brg further divides this clock by a programmable divisor between 1 and (2 16 - 0.0625) in increments of 0.0625 (1/ 16) to obtain a 16x or 8x or 4x sampling clock of th e serial data rate. the sampling clock is used by the transmitter for data bit shifting and receiver for data sampling. the brg divisor (dll, dlm, and dld registers) defaults to the value of ?1? (dll = 0x01, dlm = 0x00 and dld = 0x00) during power-on reset. the dll and dlm register s provide the integer part of the divisor and the dld register provides the fractional part of the divisor. the fo ur lower bits of the dld are used to select a value from 0 (for setting 0000) to 0.9375 or 15/16 (for setting 1111). the divisor values can be calculated with the following equations: divisor = (xtal1 clock frequency / prescaler) / (serial data rate * 16), with 16x mode, dld[5:4] = ?00? divisor = (xtal1 clock frequency / prescaler / (serial data rate * 8), with 8x mode, dld[5:4] = ?01? divisor = (xtal1 clock frequency / prescaler / (serial data rate * 4), with 4x mode, dld[5:4] = ?10? integer divisor = trunc (divisor) fractional divisor = divisor - integer divisor dlm = integer divisor / 256 dll = integer divisor & 256 dld = trunc(fractional divisor * 16) the brg divisors can be calculated using the following formulas: in the formulas above, please note that trunc (n) = integer part of n. for example, trunc (5.6) = 5. 1.8.1 fractional brg example for example, if the crystal clock is 24mhz, prescaler is 1, and the sampling mode is 16x, the divisor for a baud rate of 38400bps would be: divisor = (24000000 / 1) / (38400 * 16) = 39.0625 integer divisor = trunc (39.0625) = 39 fractional divisor = 39.0625 - 39 = 0.0625 dlm = 39 / 256 = 0 = 0x00 dll = 39 & 256 = 39 = 0x27 dld = 0.0625 * 16 = 1 = 0x1 table 6 shows the standard data rates available with a 24mhz crystal or external clock at 16x clock rate. if the pre-scaler is used (mcr bit-7 = 1), the output data ra te will be 4 times less than that shown in table 6 . at 8x sampling rate, these data rates would double. and at 4x sampling rate, they would quadruple. also, when using 8x sampling mode, please note that the bit-time will have a jitter (+/- 1/16) whenever the dld is non-zero and is an odd number. 1.8.2 independent tx/rx brg the XR20M1280 has two independent sets of tx and rx baud rate generator. see figure 13 . tx and rx can use different baud rates by setting dld, dll and dlm re gister. for example, tx can transmit data to the remote uart at 9600 bps while rx receives data from remote uart at 921.6 kbps. for the baud rate setting, see ?section 3.15, baud rate generator registers (dll, dlm and dld) - read/write? on page 44.
f igure 13. b aud r ate g enerator xtal1 xtal2 / - (default) 16x or 8x or 4x sampling rate clock to transmitter prescaler divide by 1 prescaler divide by 4 mcr bit 7= 0 mcr bit -7=1 crystal osc buffer dll dlm dld[5:0] dll dlm dld[5:0] 16x or 8x or 4x sampling rate clock to receiver dld[7]=0 dld[7]=1 0 1 dld[6] t able 6: t ypical data rates with a 24 mh z crystal or external clock at 16x s ampling required output data rate d ivisor for 16x clock (decimal) dlm p rogram v alue (hex) dll p rogram v alue (hex) dld p rogram v alue (hex) d ata e rror r ate (%) 400 3750 e a6 0 0 2400 625 2 71 0 0 4800 312.5 1 38 8 0 9600 156.25 0 9c 4 0 10000 150 0 96 0 0 19200 78.125 0 4e 2 0 25000 60 0 3c 0 0 28800 52.0833 0 34 1 0.04 38400 39.0625 0 27 1 0 50000 30 0 1e 0 0 57600 26.0417 0 1a 0 0.08 75000 20 0 14 0 0 100000 15 0 f 0 0 115200 13.0208 0 d 0 0.16 153600 9.7656 0 9 c 0.16 200000 7.5 0 7 8 0 225000 6.6667 0 6 a 0.31 230400 6.5104 0 6 8 0.16 250000 6 0 6 0 0 300000 5 0 5 0 0 400000 3.75 0 3 c 0 460800 3.2552 0 3 4 0.16 500000 3 0 3 0 0 750000 2 0 2 0 0 921600 1.6276 0 1 a 0.16 1000000 1.5 0 1 8 0 XR20M1280 16 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0
XR20M1280 17 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters 1.9 transmitter the transmitter section comp rises of an 8-bit transmit shift register (tsr) and 128 bytes of fifo which includes a byte-wide transmit holding register (thr) . tsr shifts out every data bit with the 16x/8x/4x internal clock. a bit time is 16/8/4 clock periods. th e transmitter sends the start-bit followed by the number of data bits, inserts the proper parity-bit if enabled, and a dds the stop-bit(s). the stat us of the fifo and tsr are reported in the line status register (lsr bit-5 and bit-6). 1.9.1 transmit holding regi ster (thr) - write only the transmit holding register is an 8-bit register pr oviding a data interface to the host processor. the host writes transmit data byte to the thr to be converted in to a serial data stream including start-bit, data bits, parity-bit and stop-bit(s). the least-si gnificant-bit (bit-0) becomes first data bit to go out. the thr is the input register to the transmit fifo of 12 8 bytes when fifo operation is enabled by fcr bit-0. every time a write operation is made to the thr, the fifo data pointer is automatically bumped to the next sequential data location. 1.9.2 transmitter operation in non-fifo mode the host loads transmit data to thr one character at a time. the thr empty flag (lsr bit-5) is set when the data byte is transferred to tsr. thr flag can generate a transmit empty interrupt (isr bit-1) when it is enabled by ier bit-1. the tsr flag (lsr bit-6) is set when tsr beco mes completely empty. f igure 14. t ransmitter o peration in non -fifo m ode transmit holding register (thr) transmit shift register (tsr) data byte l s b m s b thr interrupt (isr bit-1) enabled by ier bit-1 txnofifo1 16x or 8x or 4x clock ( dld[5:4] )
XR20M1280 18 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 1.9.3 transmitter operation in fifo mode the host may fill the transmit fifo with up to 128 bytes of transmit data. the thr empty flag (lsr bit-5) is set whenever the fifo is empty. the thr empty flag can ge nerate a transmit empty interrupt (isr bit-1) when the fifo becomes empty. the transmit empty interrupt is e nabled by ier bit-1. the tsr flag (lsr bit-6) is set when tsr/fifo becomes empty. f igure 15. t ransmitter o peration in fifo and f low c ontrol m ode transmit data shift register (tsr) transmit data byte thr interrupt (isr bit-1) falls below the programmed trigger level and then when becomes empty. fifo is enabled by fcr bit-0=1 transmit fifo 16x or 8x or 4x clock (dld[5:4]) auto cts flow control (cts# pin) auto software flow control flow control characters (xoff1/2 and xon1/2 reg.) txfifo1 1.10 receiver the receiver section contains an 8-bit receive shift re gister (rsr) and 128 bytes of fifo which includes a byte-wide receive holding register (rhr). the rsr us es the 16x/8x/4x clock (d ld[5:4]) for timing. it verifies and validates every bit on the incoming character in the middle of each data bit. on the falling edge of a start or false start bit, an internal receiver counter starts counting at the 16x/8x/4x clock rate. after 8 clocks (or 4 if 8x or 2 if 4x) the start bit pe riod should be at the center of the start bit. at this time the start bit is sampled and if it is still a logic 0 it is validated. evaluatin g the start bit in this manner prevents the re ceiver from assembling a false character. the rest of the data bits and stop bits are sampled and validated in this same manner to prevent false framing. if there were any error(s) , they are reported in the lsr register bits 2-4. upon unloading the receive data byte from rhr, the rece ive fifo pointer is bumped and the error tags are immediately updated to reflect the status of the data byte in rhr register. rhr can generate a receive data ready interrupt upon receiving a character or delay unt il it reaches the fifo trig ger level. furthermore, data delivery to the host is guaranteed by a receive data read y time-out interrupt when data is not received for 4 word lengths as defined by lcr[1:0] plus 12 bits time. this is equivalent to 3.7-4. 6 character times. the rhr interrupt is enabled by ier bit-0. see figure 16 and figure 17 below. 1.10.1 receive holding regi ster (rhr) - read-only the receive holding register is an 8-bit register that holds a receive data byte from the receive shift register. it provides the receive data interface to the host processor. the rhr register is part of the receive fifo of 128 bytes by 11-bits wide, the 3 extra bits are fo r the 3 error tags to be reported in lsr register. when the fifo is enabled by fcr bit-0, the rhr contains the first data character received by the fifo. after the rhr is read, the next character byte is loaded into the rhr and the errors associated with the current data byte are immediately updated in the lsr bits 2-4.
f igure 16. r eceiver o peration in non -fifo m ode receive data shift register (rsr) receive data byte and errors rhr interrupt (isr bit-2) receive data holding register (rhr) rxfifo1 16x or 8x or 4x clock ( dld[5:4] ) receive data characters data bit validation error tags in lsr bits 4:2 f igure 17. r eceiver o peration in fifo and a uto rts f low c ontrol m ode receive data shift register (rsr) rxfifo1 16x or 8x or 4x clock ( dld[5:4] ) error tags (128-sets) error tags in lsr bits 4:2 receive data characters data bit validation receive data fifo receive data receive data byte and errors rhr interrupt (isr bit-2) programmed for desired fifo trigger level. fifo is enabled by fcr bit-0=1 rts# de-asserts when data fills above the flow control trigger level to suspend remote transmitter. enable by efr bit-6=1, mcr bit-1. rts# re-asserts when data falls below the flow control trigger level to restart remote transmitter. enable by efr bit-6=1, mcr bit-1. 128 bytes by 11-bit wide fifo fifo trigger=16 data falls to 8 data fills to 56 example : - rx fifo trigger level selected at 16 bytes (see note below) XR20M1280 19 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters
XR20M1280 20 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 1.11 auto rts (hardware) flow control automatic rts hardware flow control is used to prevent data overrun to the local receiver fifo. the rts# output is used to request remote unit to suspend/r esume data transmission. the auto rts flow control features is enabled to fit specific application requirement (see figure 18 ): x enable auto rts flow control using efr bit-6. x the auto rts function must be started by asserting rts# output pin (mcr bit-1 to logic 1 after it is enabled). if using the auto rts interrupt: x enable rts interrupt through ier bit-6 (after setting efr bit-4). the uart issues an interrupt when the rts# pin makes a transition from low to high: isr bit-5 will be set to logic 1. 1.12 auto rts hysteresis with the auto rts function enabled, an interrupt is gen erated when the receive fifo reaches the selected rx trigger level. the rts# pin will not be forced high (rts off) until the re ceive fifo reaches one trigger level above the selected trigger level in the trigger table ( table 13 ). the rts# pin will return low after the rx fifo is unloaded to one level below the selected trigger level. under the above described conditions, the m1280 will continue to accept data until the receive fifo gets fu ll. the auto rts function is initiated when the rts# output pin is asserted low (rts on). table 7 below explains this when trigger table-c ( table 13 ) is selected. t able 7: a uto rts (h ardware ) f low c ontrol r x t rigger l evel irq# p in a ctivation rts# d e - asserted (h igh ) (c haracters in r x f ifo ) rts# a sserted (l ow ) (c haracters in r x f ifo ) 8 8 16 0 16 16 56 8 56 56 60 16 60 60 60 56
XR20M1280 21 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters 1.13 auto cts flow control automatic cts flow control is used to prevent data overrun to the remote receiver fifo. the cts# input is monitored to suspend/restart the local transmitter. the aut o cts flow control feature is selected to fit specific application requirement (see figure 18 ): x enable auto cts flow control using efr bit-7. if needed, the cts interrupt can be enabled through ier bi t-7 (after setting efr bit-4). the uart issues an interrupt when the cts# pin is de-asserted (high) : isr bit-5 will be set to 1, and uart will suspend transmission as soon as the stop bit of the character in process is shifted out. transmission is resumed after the cts# input is re-asserted (low), indicating more data may be sent. f igure 18. a uto rts and cts f low c ontrol o peration rtsa# ctsb# rxa txb transmitter receiver fifo trigger reached auto rts trigger level auto cts monitor rtsa# txb rxa fifo ctsb# remote uart uartb local uart uarta on off on suspend restart rts high threshold data starts on off on assert rts# to begin transmission 1 2 3 4 5 6 7 receive data rts low threshold 9 10 11 receiver fifo trigger reached auto rts trigger level transmitter auto cts monitor rtsb# ctsa# rxb txa inta (rxa fifo interrupt) rx fifo trigger level rx fifo trigger level 8 12 rtscts1 the local uart (uarta) starts data transfer by asserting rtsa# (1). rtsa# is normally connected to ctsb# (2) of remote uart (uartb). ctsb# allows its transmitter to se nd data (3). txb data arrives and fills uarta receive fifo (4). when rxa data fills up to its receive fifo trigger le vel, uarta activates its rxa data ready interrupt (5) and con - tinues to receive and put data into its fifo. if interrupt se rvice latency is long and data is not being unloaded, uarta monitors its receive data fill level to match the upper thre shold of rts delay and de-assert rtsa# (6). ctsb# follows (7) and request uartb transmitter to suspend data transfer. ua rtb stops or finishes sending the data bits in its trans - mit shift register (8). when receive fifo data in uarta is unloaded to match the lower threshold of rts delay (9), uarta re-asserts rtsa# (10), ctsb# recognizes the change (11) and restarts its transmitter and data flow again until next receive fifo trigger (12). this same event applies to the reverse direction when uarta sends data to uartb with rtsb# and ctsa# controlling the data flow.
XR20M1280 22 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 1.14 auto xon/xoff (software) flow control when software flow control is enabled ( see table 20 ), the m1280 compares one or two sequential receive data characters with the programmed xon or xoff-1,2 character value(s). if receive character(s) (rx) match the programmed values, the m1280 will halt transmission (tx) as soon as the current character has completed transmission. when a match occurs, the xoff (if enabled vi a ier bit-5) flag will be set and the interrupt output pin will be activated. following a su spension due to a match of the xoff character, the m1280 will monitor the receive data stream for a match to the xon-1,2 character. if a match is found, the m1280 will resume operation and clear the flags (isr bit-4). reset initially sets the contents of the xon/xoff 8-bit flow control registers to a logic 0. following reset the user can write any xon/xoff value desired for software flow c ontrol. different conditions can be set to detect xon/ xoff characters ( see table 20 ) and suspend/resume transmissions. when double 8-bit xon/xoff characters are selected, the m1280 compares two consecutive rece ive characters with two software flow control 8-bit values (xon1, xon2, xoff1, xoff2) and controls tx tran smissions accordingly. under the above described flow control mechanisms, flow control charac ters are not placed in the rx fifo. in the event that the receive buff er is overfilling and fl ow control needs to be executed, the m1280 automatically sends an xoff message (when enabled) vi a the serial tx output to the remote modem. the m1280 sends the xoff-1,2 characters two-character-ti mes (= time taken to send two characters at the programmed baud rate) after the receive fifo crosses the programmed trigger level. to clear this condition, the m1280 will transmit the pr ogrammed xon-1,2 ch aracters as soon as receive fifo is less than one trigger level below the progra mmed trigger level. table 8 below explains this when tr igger table-c is selected. t able 8: a uto x on /x off (s oftware ) f low c ontrol rx t rigger l evel irq# p in a ctivation x off c haracter ( s ) s ent ( characters in rx fifo ) x on c haracter ( s ) s ent ( characters in rx fifo ) 8 8 8* 0 16 16 16* 8 56 56 56* 16 60 60 60* 56 * after the trigger level is reached, an xoff character is s ent after a short span of time (= time required to send 2 characters); for example, after 2.083ms has elapsed for 9600 baud and 10-bit word length setting. 1.15 special character detect a special character detect feature is provided to detect an 8-bit character when bit-5 is set in the enhanced feature register (efr). when this character (xoff2) is detected, it will be placed in the fi fo along with normal incoming rx data. the m1280 compares each incoming receive character wit h xoff-2 data. if a match exists, the received data will be transferred to the rx fifo and isr bit-4 will be set to indicate detection of sp ecial character. although the internal register table shows xon, xoff registers with eight bits of character information, the actual number of bits is dependent on the programmed word leng th. line control register (lcr) bits 0-1 defines the number of character bits, i.e., either 5 bits, 6 bits, 7 bi ts, or 8 bits. the word length selected by lcr bits 0-1 also determines the number of bits th at will be used for the special character comparison. bit-0 in the xon, xoff registers corresponds with the ls b bit for the receive character. 1.16 auto rs485 half-duplex control operation the auto rs485 half-duplex direction control feature ca n be enabled by fctr bit [3]. the rts# pin becomes the half-duplex control output when this feature has been enabled. the rts# pin is typically connected to both the driver enable (de) and re ceiver enable (re) of an rs-485 transcei ver. when the transmitter is idle, the rts# pin is de-asserted so that the rs-485 driver is disabled and the rs-485 receiver is enabled. when data is loaded into the tx fifo, the rts# pin is asserted to enable the rs-485 driver and disable the rs-485 receiver. this changes the tr ansmitter empty interrupt to tsr empty instead of thr empty.
XR20M1280 23 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters 1.16.1 rs-485 setup time by default, the rts# pin is asserted i mmediately before there is data on t he tx output pin. for faster baud rates, it may be possible that data is lost due to a l ong start-up time for an rs-485 transceiver. the m1280 can delay the data from 0-15 bit times to allow the rs-485 transceiver to start up ( see ?section , shr[7:4]: rs- 485 setup delay? on page 40. ). 1.16.2 rs-485 turn-around delay at the end of sending data, the rts# pin is de-asserted immediately after the tx pin goes idle. the rts# pin can be programmed to delay the rts# from being asserted from 0-15 bit times ( see ?section , shr[3:0]: rs- 485 turn-around delay / auto rts hysteresis? on page 40. ). the delay optimizes the time needed for the last transmission to reach the farthest station on a long cable network before switching off the line driver. 1.17 normal multidrop (9-bit) mode - receiver normal multidrop mode is enabled when sfr[6] = 1 (re quires efr[4] = 1) and efr[5] = 0 (special character detect disabled). the receiver is set to force parity 0 (lcr[5:3] = ?111?) in order to detect address bytes. with the receiver initially di sabled, it ignores all the data bytes (parity bit = 0) until an address byte is received (parity bit = 1). this address byte will cause the uart to set the parity error. the uart will generate an lsr interrupt and place the address byte in the rx fifo. the software then examines the byte and enables the receiver if the address matches its slave address , otherwise, it does not enable the receiver. if the receiver has been enabled, the receiver will receiv e the subsequent data. if an address byte is received, it will generate an lsr inte rrupt. the software again examines the byte and if the addr ess matches its slave address, it does not have to do any thing. if the address does not match its slave address, then the receiver should be disabled. 1.17.1 auto address detection - receiver auto address detection mode is enabled when sfr[6] = 1 (requires efr[4] = 1) and efr bit-5 = 1. the desired slave address will need to be written into the xo ff2 register. the receiver will try to detect an address byte that matches the porgrammed charac ter in the xoff2 register. if the received byte is a data byte or an address byte that does no t match the programmed charac ter in the xoff2 register, the receiver will discard these data. upon receiving an address byte that matches the xoff2 character, the receiver will be automatically enabled if not already enabled, and the address character is pushed into the rx fifo along with the parity bit (in place of the parity error bit). the re ceiver also generates an lsr interrupt. the receiver will then receive the subsequent data. if another address by te is received and this address does not match the programmed xoff2 ch aracter, then the receiver will automatica lly be disabled and the address byte is ignored. if the address byte matches xoff2, the receiver will put this byte in the rx fifo along with the parity bit in the parity error bit. 1.18 multidrop (9-bit) mode - transmitter this feature simplifies sending an address byte (9th bit = 1) and improves the efficiency of the transmit data routine for transmitting 9-bit data. in previous generati on uarts, the only way to send an address byte is by changing the parity to forced 1 parity, load the address byte in the thr, wait for the byte to be transmitted, change the parity back to forced 0 parity, then load data into the tx fifo. in the XR20M1280, there?s no waiting required and no changing parity. the transmit routine can set sfr[7]=1, then write the address byte into the tx fifo followed immediately by the data bytes. sfr[7] is self-clearing, ther efore, if multiple address bytes need to be transmitted, then sfr[7] will need to be set prior to each address byte written into the tx fifo. during initialization, th e parity must be set to force parity 0 (lcr[5:3] = ?111?).
XR20M1280 24 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 1.19 infrared mode the m1280 uart includes the infrared encoder and decoder compatible to the irda (infrared data association) version 1.0 and 1.1. the irda 1.0 standa rd that stipulates the infrared encoder sends out a 3/16 of a bit wide high-pulse for each ?0? bit in the transmit data stream with a data rate up to 115.2 kbps. for the irda 1.1 standard, the infrared encoder sends out a 1/4 of a bit time wide high-pulse for each "0" bit in the transmit data stream with a data rate up to 1.152 mb ps. this signal encoding reduces the on-time of the infrared led, hence reduces the power consumption. see figure 19 below. the infrared encoder and decoder are enabled by setting mc r register bit-6 to a ?1?. with this bit enabled, the infrared encoder and decoder is compatible to the irda 1.0 standard. for the infrared encoder and decoder to be compatible to the irda 1. 1 standard, sfr bit-3 will also need to be se t to a ?1? when efr bi t-4 is set to ?1?. likewise, the rx input assumes an idle level of logic zero from a reset and power up, see figure 19 . typically, the wireless infrared decoder receives the input pulse from the infrared sensing diode on the rx pin. each time it senses a light pulse, it returns a logic 1 to the data bit stream. f igure 19. i nfrared t ransmit d ata e ncoding and r eceive d ata d ecoding character data bits start stop 0000 0 11 111 bit time 1/16 clock delay irdecoder-1 rx data receive ir pulse (rx pin) character data bits start stop 0000 0 11 111 tx data transmit ir pulse (tx pin) bit time 1/2 bit time 3/16 or 1/4 bit time irencoder-1
XR20M1280 25 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters 1.20 sleep mode with auto wake-up the m1280 supports low voltage system designs, hence, a sleep mode with auto wake-up feature is included to reduce its power consumption when the chip is not actively used. 1.20.1 sleep mode - ier bit-4 all of these conditions must be satisf ied for the m1280 to enter sleep mode: no interrupts pending (isr bit-0 = 1) sleep mode is enabled (ier bit-4 = 1) modem inputs are not toggling (msr bits 0-3 = 0) rx input pin is idling high in norm al mode or low in infrared mode divisor is non-zero tx and rx fifos are empty the m1280 stops its crystal oscillator to conserve power in the sleep mode. user can check the xtal2 pin for no clock output as an indication that the device has entered the sleep mode. the m1280 resumes normal operation by any of the following: a receive data start bit transition (high to low) a data byte is loaded to the transmitter, thr or fifo a change of logic state on any of the modem or general purpose serial inputs: cts#, dsr#, cd#, ri# if the m1280 is awakened by any one of the above c onditions, it will re turn to the sleep mode automatically after all interrupting conditions have been serviced and cleared. if the m1280 is awakened by the modem inputs, a read to the msr is requ ired to reset the modem inputs. in any case, the sleep mode will not be entered while an interrupt is pending from any channe l. the m1280 will stay in th e sleep mode of operation until it is disabled by setting ier bit-4 to a logic 0. a word of caution: owing to the star ting up delay of the crystal oscillato r after waking up from sleep mode, the first few receive characters may be lost. also, make su re the rx pin is idling high or ?marking? condition during sleep mode. this may not occur when the external interface transceivers (rs-232, rs-485 or another type) are also put to sleep mode and cannot maintain t he ?marking? condition. to avoid this, the system design engineer can use a 47k ohm pull-up resistor on each of the rx input. 1.20.2 sleep mode - sleep pin the m1280 has a new pin calle d the sleep pin that can be used instead of setting ier bit- 4=1. the m1280 will enter the sl eep mode when: the current byte in the tsr has completely shifted out the current byte in the rsr has been completely received under this condition, there could be data in the tx and rx fifos. any data that is the tx and rx fifos when the sleep pin is asserted will not be af fected. the only data that will be lost is any data that is still being received on the rx pin. the m1280 will only wa ke up after the sleep pi n has been de-asserted. 1.20.3 wake-up interrupt the m1280 has the wake up interrupt. by setting the fcr bit-3, wake up interrupt is enabled or disabled. the default status of wake up interrupt is disabled. please see ?section 3.5, fifo control register (fcr) - write-only? on page 34.
XR20M1280 26 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 1.21 internal loopback the m1280 uart provides an inter nal loopback capability for system diagnostic purposes. the internal loopback mode is enabled by setting mcr register bit-4 to logi c 1. all regular uart functions operate normally. figure 20 shows how the modem port signals are re-configured. transmit data from the transmit shift register output is internally routed to the receive shift register input allowing the system to re ceive the same data that it was sending. the tx pin is held high or mark condition while rts# and dtr# are de-asserted, and cts#, dsr# cd# and ri# inputs are ignored. caution: the rx input must be held high during loopback test else upon exiting the loopback test the uart may detect and report a false ?break? signal. f igure 20. i nternal l oopback tx rx modem / general purpose control logic internal data bus lines and control signals rts# mcr bit-4=1 vcc vcc transm it shift register (thr/fifo) receive shift register (rhr/fifo) cts# dtr# dsr# ri# cd# op1# rts# cts# dtr# dsr# ri# cd# vcc op2#
XR20M1280 27 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters 2.0 uart internal registers the complete register set for the m1280 is shown in table 9 and table 10 . t able 9: uart internal registers r egister r ead /w rite c omments 16c550 c ompatible r egisters 0 0 0 drev - device revision read-only lcr[7] = 1, lcr z 0xbf, dll = 0x00, dlm = 0x00 0 0 0 dll - divisor lsb register read/write lcr[7] = 1, lcr z 0xbf see dld[7:6] 0 0 1 dlm - divisor msb register read/write 0 1 0 dld - divisor fractional register read/write lcr[7] = 1, lcr z 0xbf, efr[4] = 1 0 0 0 rhr - receive holding register thr - transmit holding register read-only write-only lcr[7] = 0 0 0 1 ier - interrupt enable register read/write 0 1 0 isr - interrupt status register fcr - fifo control register read-only write-only lcr[7] = 0 if efr[4] = 1 or lcr z 0xbf if efr[4] = 0 0 1 1 lcr - line control register read/write 1 0 0 mcr - modem control register read/write lcr z 0xbf 1 0 1 lsr - line status register read-only 1 0 1 shr - setup/hysteresis register write-only 1 1 0 msr - modem status register read-only 1 1 0 sfr - special function register write-only lcr z 0xbf efr[4] = 1 1 1 1 spr - scratch pad register read/write lcr z 0xbf, fctr[6] = 0, sfr[0]=0 1 1 1 emsr - enhanced mode select register write-only lcr z 0xbf, fctr[6] = 1, sfr[0]=0 1 1 1 fc - rx/tx fifo level counter register read-only e nhanced r egisters 0 0 0 fc - rx/tx fifo level counter register read-only lcr = 0xbf 0 0 0 trig - rx/tx fifo tr igger level register write-only 0 0 1 fctr - feature control register read/write 0 1 0 efr - enhanced function register read/write 1 0 0 xon-1 - xon character 1 read/write lcr = 0xbf sfr[0]=0 1 0 1 xon-2 - xon character 2 read/write 1 1 0 xoff-1 - xoff character 1 read/write 1 1 1 xoff-2 - xoff character 2 read/write 1 0 0 gpioint - gpio interrupt enable register read/write lcr = 0xbf sfr[0]=1 1 0 1 gpio3t - gpio three-state control register read/write 1 1 0 gpioinv - gpio polarity control register read/write 1 1 1 gpiosel - gpio select register read/write a2 a1 a0
XR20M1280 28 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 t able 10: internal registers description. s haded bits are enabled when efr b it -4=1 a ddress a2-a0 r eg n ame r ead / w rite b it -7 b it -6 b it -5 b it -4 b it -3 b it -2 b it -1 b it -0 c omment 16c550 compatible registers 0 0 0 rhr rd bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr[7] = 0 0 0 0 thr wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 0 0 1 ier rd/wr 0/ 0/ 0/ 0/ modem stat. int. enable rx line stat. int. enable tx empty int enable rx data int. enable cts# int. enable rts# int. enable xoff int. enable sleep mode enable 0 1 0 isr rd fifos enabled fifos enabled 0/ 0/ int source bit-3 int source bit-2 int source bit-1 int source bit-0 lcr[7] = 0 if efr[4]=1 or lcr 0xbf if efr[4]=0 rts cts interrupt xoff interrupt 0 1 0 fcr wr rx fifo trigger rx fifo trigger tx fifo trigger tx fifo trigger wake up int enable tx fifo reset rx fifo reset fifos enable 0 1 1 lcr rd/wr divisor enable set tx break set parity even parity parity enable stop bits word length bit-1 word length bit-0 1 0 0 mcr rd/wr 0/ 0/ 0/ internal lopback enable op2# op1#/ rts# output control dtr# output control lcr 0xbf brg pres - caler ir mode enable xonany gpio select 1 0 1 lsr rd rx fifo global error thr & tsr empty thr empty rx break rx fram - ing error rx parity error rx over - run error rx data ready 1 0 1 shr wr rs-485 setup bit-3 rs-485 setup bit-2 rs-485 setup bit-1 rs-485 setup bit-0 rs-485 delay bit-3/ hystere - sis bit-3 rs-485 delay bit-2/ hyster - esis bit-2 rs-485 delay bit-1/ hyster - esis bit-1 rs-485 delay bit-0/ hystere - sis bit-0 1 1 0 msr rd cd# input ri# input dsr# input cts# input delta cd# delta ri# delta dsr# delta cts# 1 1 0 sfr wr tx 9-bit enable 9-bit mode disable rx disable tx fast ir gpio int enable gpio [15:8]/ [7:0] select gpio access 1 1 1 spr rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr 0xbf fctr[6]=0 sfr[0]=0 1 1 1 gpiolvl rd/wr bit-15/ bit-7 bit-14/ bit-6 bit-13/ bit-5 bit-12/ bit-4 bit-11/ bit-3 bit-10/ bit-2 bit-9/ bit-1 bit-8/ bit-0 lcr 0xbf fctr[6]=0 sfr[0]=1
XR20M1280 29 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters 1 1 1 emsr wr xoff interrupt mode select lsr interrupt mode select rsvd modem 3-state control invert rts in rs485 mode send tx imme - diate fifo count control bit-1 fifo count control bit-0 lcr 0xbf fctr[6]=1 sfr[0]=0 1 1 1 fc rd bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 baud rate generator divisor 0 0 0 drev rd bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr[7] = 1 lcr 0xbf dll= 0x00 dlm= 0x00 0 0 0 dll rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr[7] = 1 lcr 0xbf dld[7:6] 0 0 1 dlm rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 0 1 0 dld rd/wr brg select enable indepen - dent brg 4x mode 8x mode bit-3 bit-2 bit-1 bit-0 lcr[7] = 1 lcr 0xbf efr[4] = 1 enhanced registers 0 0 0 fc rd bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr=0 x bf 0 0 0 trig wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 0 0 1 fctr rd/wr rx/tx select swap spr trigger ta b l e bit-1 trigger ta b l e bit-0 auto rs485 half- duplex invert rx ir rsvd pwrdn # control 0 1 0 efr rd/wr auto cts# enable auto rts# enable special char select enable ier [7:4], isr [5:4], fcr[5:3], mcr[7:5], dld, shr, sfr soft- ware flow cntl bit-3 soft - ware flow cntl bit-2 soft - ware flow cntl bit-1 soft - ware flow cntl bit-0 1 0 0 xon1 rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr=0 x bf sfr[0]=0 1 0 1 xon2 rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 1 1 0 xoff1 rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 1 1 1 xoff2 rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 1 0 0 gpioint rd/wr bit-15/ bit-7 bit-14/ bit-6 bit-13/ bit-5 bit-12/ bit-4 bit-11/ bit-3 bit-10/ bit-2 bit-9/ bit-1 bit-8/ bit-0 lcr=0 x bf sfr[0]=1 1 0 1 gpio3t rd/wr bit-15/ bit-7 bit-14/ bit-6 bit-13/ bit-5 bit-12/ bit-4 bit-11/ bit-3 bit-10/ bit-2 bit-9/ bit-1 bit-8/ bit-0 1 1 0 gpioinv rd/wr bit-15/ bit-7 bit-14/ bit-6 bit-13/ bit-5 bit-12/ bit-4 bit-11/ bit-3 bit-10/ bit-2 bit-9/ bit-1 bit-8/ bit-0 1 1 1 gpiosel rd/wr bit-15/ bit-7 bit-14/ bit-6 bit-13/ bit-5 bit-12/ bit-4 bit-11/ bit-3 bit-10/ bit-2 bit-9/ bit-1 bit-8/ bit-0 t able 10: internal registers description. s haded bits are enabled when efr b it -4=1 a ddress a2-a0 r eg n ame r ead / w rite b it -7 b it -6 b it -5 b it -4 b it -3 b it -2 b it -1 b it -0 c omment
XR20M1280 30 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 3.0 internal register descriptions 3.1 receive holding register (rhr) - read- only see?receiver? on page 18. 3.2 transmit holding register (thr) - write-only see?transmitter? on page 17. 3.3 interrupt enable register (ier) - read/write the interrupt enable register (ier) masks the interrupts from receive data ready, transmit empty, line status and modem status registers. these interrupts are r eported in the interrupt status register (isr). 3.3.1 ier versus receive fifo interrupt mode operation when the receive fifo (fcr bit-0 = 1) and receive inte rrupts (ier bit-0 = 1) are enabled, the rhr interrupts (see isr bits 2 and 3) status will reflect the following: a. the receive data available interrupts are issued to the host when the fifo has reached the programmed trigger level. it will be cleared when the fifo drops below the programmed trigger level. b. fifo level will be reflected in the isr register when the fifo trigger level is reached. both the isr register status bit and the interrupt will be cleared wh en the fifo drops below the trigger level. c. the receive data ready bit (lsr bit-0) is set as soon as a character is transferred from the shift register to the receive fifo. it is rese t when the fifo is empty. 3.3.2 ier versus receive/transmit fifo polled mode operation when fcr bit-0 equals a logic 1 for fifo enable; re setting ier bits 0-3 enables the XR20M1280 in the fifo polled mode of operation. since the receiver and transmitter have separate bits in the lsr either or both can be used in the polled mode by selecting respective transmit or receive control bit(s). a. lsr bit-0 indicates there is data in rhr or rx fifo. b. lsr bit-1 indicates an overrun error has occurred and that data in the fifo may not be valid. c. lsr bit 2-4 provides the type of receive data erro rs encountered for the data byte in rhr, if any. d. lsr bit-5 indicates thr is empty. e. lsr bit-6 indicates when both the transmit fifo and tsr are empty. f. lsr bit-7 indicates a data error in at least one character in the rx fifo. ier[0]: rhr interrupt enable the receive data ready interrupt will be issued when rhr has a data character in th e non-fifo mode or when the receive fifo has reached the programmed trigger level in the fifo mode. ? logic 0 = disable the receive data ready interrupt (default). ? logic 1 = enable the receiver data ready interrupt. ier[1]: thr interrupt enable this bit enables the transmit ready interrupt which is issued whenever the thr becomes empty in the non- fifo mode or when data in the fifo fa lls below the programmed trigger level in the fifo mode. if the thr is empty when this bit is enabled , an interrupt will be generated. ? logic 0 = disable transmit ready interrupt (default). ? logic 1 = enable transmit ready interrupt.
XR20M1280 31 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters ier[2]: receive line status interrupt enable if any of the lsr register bits 1, 2, 3 or 4 is a logic 1, it will generate an interrupt to inform the host controller about the error status of the current data byte in fifo . lsr bit-1 generates an interrupt immediately when an overrun occurs. lsr bits 2-4 generate an interrupt when the character in the rhr has an error. however, when emsr bit-6 changes to 1 (default is 0), lsr bit 2-4 generate an interrupt when the character is received in the rx fifo. please refer to ?section 3.14, enhanced mode select register (emsr) - write-only? on page 43 . ? logic 0 = disable the receiver line status interrupt (default). ? logic 1 = enable the receiver line status interrupt. ier[3]: modem status interrupt enable ? logic 0 = disable the modem status register interrupt (default). ? logic 1 = enable the modem status register interrupt. ier[4]: sleep mode enable (requires efr[4] = 1) ? logic 0 = disable sleep mode (default). ? logic 1 = enable sleep mode. see sleep mode section for further details. ier[5]: xoff interrupt enable (requires efr[4]=1) ? logic 0 = disable the software flow cont rol, receive xoff interrupt. (default) ? logic 1 = enable the software flow control, receive xoff interrupt. see software flow control section for details. ier[6]: rts# output interrupt enable (requires efr[4]=1) ? logic 0 = disable the rts# interrupt (default). ? logic 1 = enable the rts# interrupt. the uart issues an interrupt when the rts# pin makes a transition from low to high (if enabled by efr bit-6). ier[7]: cts# input interrupt enable (requires efr[4]=1) ? logic 0 = disable the cts# interrupt (default). ? logic 1 = enable the cts# interrupt. the uart issues an interrupt when cts# pin makes a transition from low to high (if enabled by efr bit-7). 3.4 interrupt status register (isr) - read-only the uart provides multiple levels of prioritized interrupts to minimize external software interaction. the interrupt status register (isr) provides the user with six interrupt status bits. performing a read cycle on the isr will give the user the current hi ghest pending interrupt level to be se rviced, others are queued up to be serviced next. no other interrupts are acknowledged until the pending interrupt is serviced. the interrupt source table, table 11 , shows the data values (bit 0-5) for the inte rrupt priority levels and the interrupt sources associated with each of these interrupt levels.
XR20M1280 32 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 3.4.1 interrupt generation: x lsr is by any of the lsr bits 1, 2, 3 and 4. x rxrdy is by rx trigger level. x rxrdy time-out is by a 4-char plus 12 bits delay timer. x txrdy is by tx trigger level or tx fifo empty. x msr is by any of the msr bits 0, 1, 2 and 3. x receive xon/xoff/special character is by dete ction of a xon, xoff or special character. x cts# is when the remote tr ansmitter toggles the input pin (from low to high) during auto cts flow control. x rts# is when its receiver toggles the output pin (f rom low to high) during auto rts flow control. x wakeup interrupt is generated when the m1280 wakes up from the sleep mode. x gpio interrupt is generated when a gpio input has b een asserted (polarity selected by gpioinv register) 3.4.2 interrupt clearing: x lsr interrupt is cleared by a read to the lsr register. x rxrdy interrupt is cleared by reading data until fifo falls be low the trigger level. x rxrdy time-out interrupt is cleared by reading rhr. x txrdy interrupt is cleared by a read to the isr register or writing to thr. x msr interrupt is cleared by a read to the msr register. x xon or xoff interrupt is cleared by a read to the isr register. x special character interrupt is cleared by a read to isr register or after next character is received. x rts# and cts# flow control interrupts are cleared by a read to the msr register. x wakeup interrupt is cleared by a read to isr register. x gpio interrupt is cleared by a read to the gpiolvl register ] t able 11: i nterrupt s ource and p riority l evel p riority isr r egister s tatus b its s ource of interrupt l evel b it -5 b it -4 b it -3 b it -2 b it -1 b it -0 1 0 0 0 1 1 0 lsr (receiver line status register) 2 0 0 1 1 0 0 rxrdy (receive data time-out) 3 0 0 0 1 0 0 rxrdy (received data ready) 4 0 0 0 0 1 0 txrdy (transmit ready) 5 0 0 0 0 0 0 msr (modem status register) 6 0 1 0 0 0 0 rxrdy (received xon, xoff or special character) 7 1 0 0 0 0 0 cts#, rts# change of state - 0 0 0 0 0 1 none (default) or wakeup interrupt
XR20M1280 33 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters isr[0]: interrupt status x logic 0 = an interrupt is pending and the isr contents ma y be used as a pointer to the appropriate interrupt service routine. x logic 1 = no interrupt pending (default condition). isr[3:1]: interrupt status these bits indicate the source for a pending interrupt at interrupt priority levels (see table 11 ). isr[4]: interrupt status (requires efr bit-4 = 1) this bit is enabled when efr bit-4 is set to a logic 1. is r bit-4 indicates that the receiver detected a data match of the xoff, xon or special character(s). isr[5]: interrupt status (requires efr bit-4 = 1) isr bit-5 indicates that cts# or rts# has changed state from low to high. isr[6]: gpio interrupt status this bit reports the gpio interrupt status. when a gpio interrupt ha s been genera ted, this bit will be the inverse of isr[7]. when the gpio interrupt is not enabled, this bit will match isr[7] for 16550 compatibility (see table 12 ). isr[7]: fifo enable status this bit is set to a logic 0 when the fifos are disabled. it is set to a l ogic 1 when the fifos are enabled (see table 12 ). t able 12: fifo e nable s tatus /gpio i nterrupt s tatus fifo m ode gpio i nterrupt e nabled (gpioint r egister ) gpio i nterrupt s tatus 0 fifo disabled no no gpio interrupt 0 0 0 fifo disabled yes no gpio interrupt 0 0 0 fifo disabled yes gpio interrupt 0 1 1 fifo enabled no no gpio interrupt 1 1 1 fifo enabled yes no gpio interrupt 1 1 1 fifo enabled yes gpio interrupt 1 0 fcr[0] isr[7] isr[6]
XR20M1280 34 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 3.5 fifo control register (fcr) - write-only this register is used to enable the fifos, clear the fi fos, set the transmit/receive fifo trigger levels, and enable the wake up interrupt. they are defined as follows: fcr[0]: tx and rx fifo enable ? logic 0 = disable the transmit and receive fifo (default). ? logic 1 = enable the transmit and receive fifos. this bit must be set to logic 1 when other fcr bits are written or they will not be programmed. fcr[1]: rx fifo reset this bit is only active when fcr bit-0 is a ?1?. ? logic 0 = no receive fifo reset (default) ? logic 1 = reset the receive fifo pointers and fifo le vel counter logic (the rece ive shift register is not cleared or altered). this bit will return to a logic 0 after resetting the fifo. fcr[2]: tx fifo reset this bit is only active when fcr bit-0 is a ?1?. ? logic 0 = no transmit fifo reset (default). ? logic 1 = reset the transmit fifo pointers and fifo le vel counter logic (the transmit shift register is not cleared or altered). this bit will return to a logic 0 after resetting the fifo. fcr[3]: enable wake up interrupt (requires efr bit-4 = 1) ? logic 0 = disable the wake up interrupt (default). ? logic 1 = enable the wake up interrupt. please refer to ?section 1.20.3, wake-up interrupt? on page 25 . fcr[5:4]: transmit fifo trigger select (requires efr bit-4 = 1) these 2 bits set the trigger level for the transmit fifo. the uart will issue a transmit interrupt when the number of characters in the fifo falls below the selected trigger level, or when it gets empty in case that the fifo did not get filled over the trigger level on last re-load. table 13 below shows the select ions. note that the receiver and the transmitter cannot use different trigge r tables. whichever selecti on is made last applies to both the rx and tx side. fcr[7:6]: receive fifo trigger select these 2 bits are used to se t the trigger level for the receive fifo. th e uart will issue a rece ive interrupt when the number of the characters in the fifo crosses the trigger level. table 13 shows the complete selections. note that the receiver and the transmitter cannot use di fferent trigger tables. whichever selection is made last applies to both the rx and tx side.
t able 13: t ransmit and r eceive fifo t rigger t able and l evel s election t rigger t able b it -5 b it -4 b it -7 b it -6 b it -5 bit -4 r eceive t rigger l evel t ransmit t rigger l evel c ompatibility table-a 0 0 0 0 1 1 0 1 0 1 0 0 1 (default) 4 8 14 1 (default) 16c550, 16x255x, 16x554, 16x57x, 16x58x table-b 0 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 8 16 24 28 16 8 24 30 16c650a, 16l651, 16x265x, 16x564 table-c 1 0 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 8 16 56 60 8 16 32 56 16x654 table-d 1 1 x x x x programmable via trg register. fctr[7] = 0. programmable via trg register. fctr[7] = 1. 16x275x, 16c285x, 16c850, 16c854, 16c864 XR20M1280 35 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters 3.6 line control register (lcr) - read/write the line control register is used to specify the asynchronous data communication format. the word or character length, the number of stop bits, and the parity are selected by writing the appropriate bits in this register. lcr[1:0]: tx and rx word length select these two bits specify the word length to be transmitted or received. w ord length 0 0 5 (default) 0 1 6 1 0 7 1 1 8 fctr fctr fcr fcr fcr fcr bit-1 bit-0
XR20M1280 36 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 lcr[2]: tx and rx stop-bit length select the length of stop bit is specified by this bi t in conjunction with the programmed word length. w ord length s top bit length (b it time ( s )) 0 5,6,7,8 1 (default) 1 5 1-1/2 1 6,7,8 2 lcr[3]: tx and rx parity select parity or no parity can be selected via this bit. the pa rity bit is a simple way used in communications for data integrity check. see table 14 for parity selection summary below. x logic 0 = no parity. x logic 1 = a parity bit is generated during the transmissi on while the receiver checks for parity error of the data character received. lcr[4]: tx and rx parity select if the parity bit is enabled with lcr bit-3 set to a logi c 1, lcr bit-4 selects the even or odd parity format. x logic 0 = odd parity is generated by forcing an odd number of logic 1?s in the transmitted character. the receiver must be programmed to check the same format (default). x logic 1 = even parity is gen erated by forcing an even numb er of logic 1?s in the tr ansmitted character. the receiver must be programmed to check the same format. lcr[5]: tx and rx parity select if the parity bit is enabled, lcr bit- 5 selects the forced parity format. x lcr bit-5 = logic 0, parity is not forced (default). x lcr bit-5 = logic 1 and lcr bit-4 = logic 0, parity bit is forced to a logical 1 for the transmit and receive data. x lcr bit-5 = logic 1 and lcr bit-4 = logic 1, parity bit is forced to a logical 0 for the transmit and receive data. t able 14: p arity selection lcr b it -5 lcr b it -4 lcr b it -3 p arity selection x x 0 no parity 0 0 1 odd parity 0 1 1 even parity 1 0 1 force parity to mark, high 1 1 1 forced parity to space, low bit-2
XR20M1280 37 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters lcr[6]: transmit break enable when enabled, the break control bit causes a break cond ition to be transmitted (the tx output is forced to a ?space?, logic 0, state). this co ndition remains, until disabled by setting lcr bit-6 to a logic 0. ? logic 0 = no tx break condition. (default) ? logic 1 = forces the transmitter output (tx) to a ?space ?, logic 0, for alerting the remote receiver of a line break condition. lcr[7]: baud rate divisors enable baud rate generator divisor (dll/dlm/dld) enable. ? logic 0 = data registers are selected. (default) ? logic 1 = divisor latch registers are selected. 3.7 modem control register (mcr) or general purpose outputs control - read/write the mcr register is used for controlling the serial/mod em interface signals or g eneral purpose inputs/outputs. mcr[0]: dtr# output the dtr# pin is a modem control outpu t. if the modem interface is not us ed, this output may be used as a general purpose output. ? logic 0 = force dtr# output high (default). ? logic 1 = force dtr# output low. mcr[1]: rts# output the rts# pin is a modem control output and may be used for automatic hardware flow control by enabled by efr bit-6. if the modem interface is not used, this output may be used as a general purpose output. ? logic 0 = force rts# output high (default). ? logic 1 = force rts# output low. it is required to start auto rts flow control. mcr[2]: gpio[3:0] or modem io select this bit controls whether gpio[3:0] behave as gpio pins or as modem io pi ns (ri#, cd#, dtr#, dsr#) ? logic 0 = gpio[3:0] behave as gpio pins ? logic 1 = gpio[3:0] behave as ri#, cd#, dtr#, dsr# in the loopback mode, this bit is used as the op1# to write the state of the modem ri# interface signal. mcr[3]: op2# output op2# is not available as an output on the m1280 but can be controlled in internal loopback mode. ? logic 0 = op2# output set high(default). ? logic 1 = op2# output set low. mcr[4]: internal loopback enable ? logic 0 = disable loopback mode (default). ? logic 1 = enable local loopback mode, see loopback section and figure 20 .
XR20M1280 38 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 mcr[5]: xon-any enable (requires efr bit-4 = 1) ? logic 0 = disable xon-any function (for 16c550 compat ibility, default). ? logic 1 = enable xon-any function. in this mode, any rx character rece ived will resume transmit operation. the rx character will be loaded into the rx fifo , unless the rx character is an xon or xoff character and the m1280 is programmed to use the xon/xoff flow control. mcr[6]: infrared encoder/decoder enable (requires efr bit-4 = 1) ? logic 0 = enable the standard modem receive an d transmit input/output interface. (default) ? logic 1 = enable infrared irda receive and transmit inputs/outputs. the tx/rx output/input are routed to the infrared encoder/decoder. the data input and output levels conform to the irda infrared interface requirement. the rx fifo may need to be flushed upon enable. while in this mode, the infrared tx output will be low during idle data conditions. mcr[7]: clock prescaler select (requires efr bit-4 = 1) ? logic 0 = divide by one. the input clock from the crystal or external clock is fed directly to the programmable baud rate generator without further modification, i.e., divide by one (default). ? logic 1 = divide by four. the prescaler divides the input clock from the crystal or external clock by four and feeds it to the programmable baud rate generator, hence, data rates become one forth. 3.8 line status register (lsr) - read only this register provides the status of data transfers betw een the uart and the host. if ier bit-2 is enabled, lsr bit 1 will generate an inte rrupt immediately and lsr bits 2-4 will generate an inte rrupt when a character with an error is in the rhr. lsr[0]: receive data ready indicator ? logic 0 = no data in receive holding register or fifo (default). ? logic 1 = data has been received and is save d in the receive holding register or fifo. lsr[1]: receiver overrun flag ? logic 0 = no overrun error (default). ? logic 1 = overrun error. a data overrun error condition occurred in the receive shift register. this happens when additional data arrives while the fi fo is full. in this case the previous data in the receive shift register is overwritten. note that under this condition the data byte in the receive shift register is not transferred into the fifo, therefore the data in the fifo is not corrupted by the error. lsr[2]: receive data parity error tag ? logic 0 = no parity error (default). ? logic 1 = parity error. the receive character in rhr does not have correct pa rity information and is suspect. this error is associated with the char acter available for reading in rhr. lsr[3]: receive data framing error tag ? logic 0 = no framing error (default). ? logic 1 = framing error. the receive character did not hav e a valid stop bit(s). this error is associated with the character available for reading in rhr.
XR20M1280 39 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters lsr[4]: receive break tag ? logic 0 = no break condition (default). ? logic 1 = the receiver received a break signal (rx wa s low for at least one char acter frame time). in the fifo mode, only one break character is loaded into the fifo. the break indication remains until the rx input returns to the idle condition, ?mark? or high. lsr[5]: transmit holding register empty flag this bit is the transmit holding register empty indicator. the thr bit is set to a logic 1 when the last data byte is transferred from the transmit holding register to th e transmit shift register. t he bit is reset to logic 0 concurrently with the data loading to the transmit holding r egister by the host. in the fifo mode this bit is set when the transmit fifo is empty, it is cleared when the transmit fifo contains at least 1 byte. lsr[6]: thr and tsr empty flag this bit is set to a logic 1 whenever the transmitter goes idle. it is set to logic 0 whenever either the thr or tsr contains a data character. in the fifo mode this bi t is set to a logic 1 whenever the transmit fifo and transmit shift register are both empty. lsr[7]: receive fifo data error flag ? logic 0 = no fifo error (default). ? logic 1 = a global indicator for the sum of all error bits in the rx fifo. at least one parity error, framing error or break indication is in the fifo data. this bit clears wh en there is no more error(s) in any of the bytes in the rx fifo.
XR20M1280 40 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 3.9 setup/hysteresis register (shr) - write only in the auto rs-485 half-duplex mode, the rts# control output can be asserted from 0 to 15 bit times before data is transmitted to allow for the startup time of an rs-485 transceiver that may be in shutdown mode. the rts# control output can also be delayed from 0 to 15 bi t times after the last byte has been transmitted to allow the data to propogate down long data cables. in the auto rts flow control mode , this register selects the hyster esis levels that will be used with programmable trigger levels (trigger table-d). shr[3:0]: rs-485 turn-around delay / auto rts hysteresis when the auto rs-485 half-dup lex mode is enabled (fctr[3] = 1), th e value programmed in these bits will be the number of bits (0-15) the rts# pin will wait before it is de-asserted after the last byte that has been transmitted. when auto rts flow control is enabled (efr[6] = 1) and programmable trigger levels are used (fctr[5:4] = ?11?), these bits select the hysteresis le vels for the rts# flow control pin (see table 15 ). t able 15: a uto rts h ysteresis shr b it -3 shr b it -2 shr b it -1 shr b it -0 rts# h ysteresis (c haracters ) 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 4 6 8 0 0 0 0 1 1 1 1 0 0 1 1 0 1 0 1 8 16 24 32 1 1 1 1 0 0 0 0 0 0 1 1 0 1 0 1 40 44 48 52 1 1 1 1 1 1 1 1 0 0 1 1 0 1 0 1 12 20 28 36 shr[7:4]: rs-485 setup delay when the auto rs-485 half-dup lex mode is enabled (fctr[3] = 1), th e value programmed in these bits will be the number of bits (0-15) the rts# pin is as serted before the first byte is transmitted.
XR20M1280 41 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters 3.10 modem status register (msr) - read only this register provides the current state of the modem interf ace input signals. lower four bits of this register are used to indicate the changed information. these bits are set to a logic 1 whenever a signal from the modem changes state. these bits may be used for general purpose inputs when they are not used with modem signals. reading the higher four bits shows the status of the modem signals. msr[0]: delta cts# input flag ? logic 0 = no change on cts# input (default). ? logic 1 = the cts# input has changed state since the la st time it was monitored. a modem status interrupt will be generated if msr interrup t is enabled (ier bit-3). msr[1]: delta dsr# input flag ? logic 0 = no change on dsr# input (default). ? logic 1 = the dsr# input has changed state since the last time it was monitored. a modem status interrupt will be generated if msr interrup t is enabled (ier bit-3). msr[2]: delta ri# input flag ? logic 0 = no change on ri# input (default). ? logic 1 = the ri# input has changed from low to high, ending of the ringing signal. a modem status interrupt will be ge nerated if msr in terrupt is enabled (ier bit-3). msr[3]: delta cd# input flag ? logic 0 = no change on cd# input (default). ? logic 1 = indicates that the cd# input has changed st ate since the last time it was monitored. a modem status interrupt will be generated if msr interrupt is enabled (ier bit-3). msr[4]: cts input status cts# pin may function as automatic hardware flow control signal input if it is enabled and selected by auto cts (efr bit-7). auto cts flow control allows starting and stopping of local data transmissions based on the modem cts# signal. a high on the cts# pin will stop uart transmitte r as soon as the current character has finished transmission, and a low will re sume data transmission. normally ms r bit-4 bit is the complement of the cts# input. however in the loopba ck mode, this bit is equivalent to the rts# bit in the mcr register. the cts# input may be used as a general purpose input when the modem interface is not used. msr[5]: dsr input status normally this bit is the complement of the dsr# input. in the loopback mode, this bit is equivalent to the dtr# bit in the mcr register. the dsr# input may be used as a general purpose input when the modem interface is not used. msr[6]: ri input status normally this bit is the complement of the ri# input. in the loop back mode this bit is equivalent to bit-2 in the mcr register. the ri# input may be used as a general purpose input when the modem interface is not used. msr[7]: cd input status normally this bit is the complement of the cd# input. in the loopback mode this bit is equivalent to bit-3 in the mcr register. the cd# input may be used as a general purpose input when the modem interface is not used.
XR20M1280 42 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 3.11 special function register (sfr) - write only this register provides access to some of the advanced feat ures of XR20M1280. sfr[0]: enable gpio registers (requires efr[4] = 1) ? logic 0 = gpio control and status registers are not enabled. ? logic 1 = gpiolvl register is accessible at spr r egister location. gpioint, gpio3t, gpioinv, gpiosel registers are accessible at xon1, xon2, xoff1, and xoff2 register locations. sfr[1]: gpio[15:8] or gpio[7:0] select (requires efr[4] = 1) ? logic 0 = gpiolvl, gpioint, gpio3t, gpioinv and gp iosel registers will contro l and report the status of gpio[7:0]. ? logic 1 = gpiolvl, gpioint, gpio3t, gpioinv and gp iosel registers will contro l and report the status of gpio[15:8]. sfr[2]: gpio interrupt enable (requires efr[4] = 1) ? logic 0 = gpio interrupt is disabled. ? logic 1 = gpio interrupt is enabled. gpios that hav e been configured as inputs can generate gpio interrupts if the bit is enabled in the gpioint register. the polarity of the gpio interrupt is selected via the gpioinv register. sfr[3]: enable/disable fast ir mode (requires efr[4] = 1) the m1280 supports the new fast ir transm ission with data rate up to 1.152 mbps. ? logic 0 = irda version 1.0, 3/16 pulse rati o, data rate up to 115.2 kbps (default). ? logic 1 = irda version 1.1, 1/4 pulse ratio, data rate up to 1.152 mbps. for more ir mode information, please see ?section 1.19, infrared mode? on page 24. sfr[4]: enable/disable transmitter (requires efr[4] = 1) ? logic 0 = enable transmitter (default). ? logic 1 = disable transmitter. sfr[5]: enable/disable receiver (requires efr[4] = 1) ? logic 0 = enable receiver (default). ? logic 1 = disable receiver. sfr[6]: enable/disable 9-bit mode (requires efr[4] = 1) for the 9-bit mode information, see ?section 1.17, normal multidrop (9-bit) mode - receiver? on page 23. ? logic 0 = normal 8-bit mode (default). ? logic 1 = enable 9-bit or multidrop mode. sfr[7]: tx address bit (requires efr[4] = 1) this bit requires that forced "0" parity is enabled (lcr[5 :3]=?111?). if this bit is enabled, the 9th bit of the next byte written to thr will be a ?1?. this bit resets af ter a write to thr. for the 9-bit mode information, see ?section 1.18, multidrop (9-bit) mode - transmitter? on page 23. ? logic 0 = value of 9th bit will be ?0? (default). ? logic 1 = value of 9th bit will be ?1?.
XR20M1280 43 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters 3.12 scratch pad register (spr) - read/write this is an 8-bit general purpose register for the user to store temporary data. the content of this register is preserved during sleep mode but becomes 0xff (default) after a reset or a power off-on cycle. 3.13 gpio level register (gpiolvl) - read/write this register provides the curr ent state of the gpio pins. if a gpio has been configured as an input:  a read will report the current state of the input.  a write to any gpio configured as an input will not have any effect. if a gpio has been configured as an output:  a read will report the curren t value of the register. the current value of the register will also be the current state of the output pin if three-st ate mode is not enabled (gpio3t register).  a write will change the current value of the register. the current val ue of the register will also be the current state of the output pin if three-st ate mode is not enabled (gpio3t register). 3.14 enhanced mode select register (emsr) - write-only this register replaces spr (during a write) and is accessible only when fctr[6] = 1. emsr[1:0]: receive/transmit fifo level count when scratchpad swap (fctr[6]) is asserted, emsr bits 1-0 controls what mode the fifo level counter is operating in. t able 16: s cratchpad s wap s election fctr[6] emsr[1] emsr[0] scratchpad is 0 x x scratchpad 1 x 0 rx fifo level counter mode 1 0 1 tx fifo level counter mode 1 1 1 alternate rx/tx fifo counter mode during alternate rx/tx fifo level counter mode, the first value read after emsr bits 1-0 have been asserted will always be the rx fifo level counter. th e second value read will corr espond with the tx fifo level counter. the next value will be the rx fifo leve l counter again, then the tx fifo level counter and so on and so forth. emsr[2]: send tx immediately x logic 0 = do not send tx immediately (default). x logic 1 = send tx immediately. when fifo is enabled and this bit is se t, the next data w ill be written to the tx shift register. thus, the data will be sent out immedi ately instead of queuing in the fifo. every time, only 1 byte will be send out. once this byte has been sent out, the emsr[2] will go back to 0 automatically. if more than 1 byte will be sent out, emsr[2 ] needs to be set to 1 for each byte. emsr[3]: invert rts in rs485 mode x logic 0 = rts# output is a logic 0 during tx (default). x logic 1 = rts# output is a logic 1 during tx.
XR20M1280 44 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 emsr[4]: modem outputs three-state control x logic 0 = tx, rts#, and dtr# outputs are active (default). x logic 1 = tx, rts#, and dtr# outputs are in three-state mode. emsr[5]: reserved this bit is reserved and should be ?0?. emsr[6]: lsr interrupt mode x logic 0 = lsr interrupt delayed (default ). lsr bits 2, 3, and 4 will genera te an interrupt w hen the character with the error is in the rhr. x logic 1 = lsr interrupt immedi ate. lsr bits 2, 3, and 4 will generate an interrupt as soon as the character is received into the fifo. emsr[7]: xoff/special character interrupt mode select this bit selects how the xoff and special character interr upt is cleared. the xon interrupt can only be cleared by reading the isr register. x logic 0 = xoff interrupt is cleared by either readin g isr register or when an xon character is received. special character interrupt is cleared by either readi ng isr register or when next character is received. (default). x logic 1 = xoff/special character interrupt can only be cleared by reading the isr register. 3.15 baud rate generator registers (dll, dlm and dld) - read/write these registers make-up the value of the baud rate di visor. the m1280 has different dll, dlm and dld for transmitter and receiver. it provides more convenience for the transmitter and receiver to transmit data with different rate. the m1280 uses dld[7:6] to select tx or rx. then it prov ides dld[5:0] to select the sampling frequency and fractional baud rate divisor. the concatenation of the contents of dlm and dll gives the 16-bit divisor value. the value is added to dld[3:0]/16 to ac hieve the fractional baud rate divisor. dld must be enabled via efr bit-4 before it can be accessed. see table 17 below and see ?section 1.8, programmable baud rate generator with fractional divisor? on page 15. dld[5:4]: sampli ng rate select these bits select the data sampling rate. by default, the data sampling rate is 16x. the maximum data rate will double if the 8x mode is selected and will quadruple if th e 4x mode is selected. see table 17 below. t able 17: s ampling r ate s elect s ampling r ate 0 0 16x 0 1 8x 1 x 4x dld[6]: independent brg enable x logic 0 = the transmitter and receiver uses the same baud rate generator. (default). x logic 1 = the transmitter and receiver uses different baud rate generators. use dld[7] for selecting which baud rate generator to configure. dld[5] dld[4]
XR20M1280 45 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters dld[7]: brg select when dld[6] = 1, this bit selects whether the values written to dll, dlm and dld[5:0] will be for the transmit baud rate generator or the receive baud rate generator. when dld[6] = 0 (same baud rate generator used for both tx and rx), this bit must be a logic 0 to properly write to the appropriate dll, dlm and dld[5:0]. . t able 18: brg s elect 0 0 transmitter and receiver uses same brg. writing to dll, dlm and dld[5:0] conf igures the brg for both the tx and rx. 0 1 transmitter and receiver uses different brgs. writing to dll, dlm and dld[5: 0] configures the brg for tx. 1 1 transmitter and receiver uses different brgs. writing to dll, dlm and dld[5:0] configures the brg for rx. 1 0 transmitter and receiver uses same brg. writing to dll, dlm and dld[5:0] has no effect on brg used by the tx and rx. 3.16 trigger level register (trg) - write-only user programmable transmit/receive trigger level register. trg[7:0]: trigger level register these bits are used to program desired trigger levels when trigger table-d is selected. fctr bit-7 selects between programming the rx trigger level (a logic 0) and the tx trigger level (a logic 1). 3.17 rx/tx fifo level count register (fc) - read-only this register replaces spr (during a read) and is a ccessible when fctr[6] = 1. this register is also accessible when lcr = 0xbf. it is suggested to read the fifo level count register at the scratchpad register location when fctr bit-6 = 1. see table 16 . fc[7:0]: rx/tx fifo level count receive/transmit fifo level count. number of characte rs in receiver fifo (fct r[7] = 0) or transmitter fifo (fctr[7] = 1) can be read via this register. re ading this register is ok anytime since setting lcr = 0xbf no longer affects the data byte format. 3.18 feature control register (fctr) - read/write fctr[0]: sleep/pwrdn# function control x logic 0 = sleep pin (input) is enabled. this pin can be used to fo rce the XR20M1280 to enter the sleep mode immediately after the next data byte that is be ing transmitted on the tx pin and being received on the rx pin has been completed. x logic 1 = pwrdn# pin (output) is en abled. when the xr20 m1280 enters th e sleep mode, this pin will be low. when the XR20M1280 is not in sleep mode, this pin will be high. fctr[1]: reserved this bit is reserved and should be ?0?. fctr[2]: irda rx inversion x logic 0 = select rx input as encoded irda data (idle state will be low). x logic 1 = select rx input as inverted en coded irda data (idle state will be high). dld[7] dld[6] brg
XR20M1280 46 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 fctr[3]: auto rs-485 direction control x logic 0 = standard st16c550 mode. transmitter generates an interrupt when transmit holding register becomes empty and transmit shift register is shifting data out. x logic 1 = enable auto rs485 direction control function . the direction control signal, rts# pin, changes its output logic state from low to high on e bit time after the last stop bit of the last character is shifted out. also, the transmit interrupt generation is delayed unt il the transmitter shift register becomes empty. the rts# output pin will automatically retu rn to a low when a data byte is loaded into the tx fifo. however, rts# behavior can be inverted by setting emsr[3] = 1. fctr[5:4]: transmit/receive trigger table select see t able 19: t rigger t able s elect b it -5 b it -4 t able 0 0 table-a (tx/rx) 0 1 table-b (tx/rx) 1 0 table-c (tx/rx) 1 1 table-d (tx/rx) table 19 for more details. fctr[6]: scratchpad swap x logic 0 = scratch pad register is selected as genera l read and write register. st16c550 compatible mode. x logic 1 = fifo count register (read-only), enhanced mode select register (write-only). number of characters in transmit or receive fifo can be read vi a scratch pad register when this bit is set. enhanced mode select register is select ed when it is written into. fctr[7]: programmable trigger register select x logic 0 = registers trg and fc selected for rx. x logic 1 = registers trg and fc selected for tx. 3.19 enhanced feature register (efr) - read/write enhanced features are enabled or disabled using this register. bit 0-3 provide si ngle or dual consecutive character software flow control selection (see table 20 ). when the xon1 and xon2 and xoff1 and xoff2 modes are selected, the double 8-bit words are concatenated in to two sequential characters. caution: note that whenever changing the tx or rx flow control bits, always reset all bits back to logic 0 (disable) before programming a new setting. fctr fctr
XR20M1280 47 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters efr[3:0]: software flow control select single character and dual sequential characters software flow control is supported. combinations of software flow control can be selected by programming these bits. t able 20: s oftware f low c ontrol f unctions efr bit -3 c ont -3 efr bit -2 c ont -2 efr bit -1 c ont -1 efr bit -0 c ont -0 t ransmit and r eceive s oftware f low c ontrol 0 0 0 0 no tx and rx flow control (default and reset) 0 0 x x no transmit flow control 1 0 x x transmit xon1, xoff1 0 1 x x transmit xon2, xoff2 1 1 x x transmit xon1 and xon2, xoff1 and xoff2 x x 0 0 no receive flow control x x 1 0 receiver compares xon1, xoff1 x x 0 1 receiver compares xon2, xoff2 1 0 1 1 transmit xon1, xoff1 receiver compares xon1 or xon2, xoff1 or xoff2 0 1 1 1 transmit xon2, xoff2 receiver compares xon1 or xon2, xoff1 or xoff2 1 1 1 1 transmit xon1 and xon2, xoff1 and xoff2, receiver compares xon1 and xon2, xoff1 and xoff2 0 0 1 1 no transmit flow control, receiver compares xon1 and xon2, xoff1 and xoff2 efr[4]: enhanced function bits enable enhanced function control bit. this bit enables ier bits 4-7, isr bits 4-5, fcr bits 3-5, mcr bits 5-7, dld, shr and sfr to be modified. after modifying any enhanced bits, efr bit-4 can be set to a logic 0 to latch the new values. this feature prevents legacy software from altering or overwriting the enhanced functions once set. normally, it is recommended to leave it enabled, logic 1. x logic 0 = modification disable/latch enhanced features. ie r bits 4-7, isr bits 4-5, fcr bits 3-5, mcr bits 5- 7, dld, shr and sfr are saved to retain the user settings. after a reset, the ier bits 4-7, isr bits 4-5, fcr bits 3-5, and mcr bits 5-7, dld, shr and sfr are se t to a logic 0 to be comp atible with st16c550 mode (default). x logic 1 = enables the efr[3:0] register bits to be modified by the user. efr[5]: special character detect enable x logic 0 = special character detect disabled (default). x logic 1 = special character detect enabled. the ua rt compares each incomi ng receive character with data in xoff-2 register. if a match exists, the receive data will be transfer red to fifo and isr bit-4 will be set to indicate detection of the special character. bit-0 co rresponds with the lsb bit of the receive character. if flow control is set for comparing xon1, xo ff1 (efr [1:0]= ?10?) then flow control and special character work normally. however, if flow control is set for comparing xon2, xoff2 (efr[1:0]= ?01?) then flow control works normally, but xoff2 will not go to the fifo, and will ge nerate an xoff interrupt and a special character interrupt, if enabled via ier bit-5.
XR20M1280 48 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 efr[6]: auto rts flow control enable rts# output may be used for hardware flow control by setting efr bit-6 to logic 1. when auto rts is selected, an interrupt will be generated when the receive fifo is filled to the pr ogrammed trigge r level and rts de-asserts high at the next upper trigger level/hysteresis level. rts# will return low when fifo data falls below the next lower trigger leve l/hysteresis level. the rts# output must be asserted (low) before the auto rts can take effect. rts# pin will function as a general purpose ou tput when hardware flow control is disabled. ? logic 0 = automatic rts flow control is disabled (default). ? logic 1 = enable automatic rts flow control. efr[7]: auto cts flow control enable automatic cts flow control. ? logic 0 = automatic cts flow control is disabled (default). ? logic 1 = enable automatic cts flow control. data tr ansmission stops when cts# input de-asserts to logic 1. data transmission resumes wh en cts# returns to a logic 0. 3.20 software flow control registers (xoff1, xoff2, xon1, xon2) - read/write these registers are used as the prog rammable software flow control characters xoff1, xoff2, xon1, and xon2. for more details, see table 8 . the xoff2 is also used as auto address detect register when the auto 9-bit mode enabled. see ?section 1.17.1, auto address detection - receiver? on page 23. 3.21 gpio interrupt enable register (gpioint) - read/write if a gpio has been configured as an input, this register selects which inputs can generate a gpio interrupt. this register controls gpio[7:0] when sf r[1] = 0 and gpio[15:8] when sfr[1] = 1. ? logic 0 = gpio interrupt for th is input pin is not enabled. ? logic 1 = gpio interrupt for this input pin is enabled. 3.22 gpio three-state control register (gpio3t) - read/write if a gpio has been configured as an output, this register selects which outputs will be in three-state mode. this register controls gpio[7:0] when sf r[1] = 0 and gpio[15:8] when sfr[1] = 1. ? logic 0 = gpio output is in active mode and can be controlled via gpiolvl register. ? logic 1 = gpio output is in three-state mode. 3.23 gpio polarity control regi ster (gpioinv) - read/write if a gpio has been configured as an interrupt, this re gister selects the polarity that can generate a gpio interrupt. this register controls gpio[7:0] when sfr[1] = 0 and gpio[15:8] when sfr[1] = 1. ? logic 0 = gpio interrupt is generated when this input pi n transitions from low to high. rd gpio lvl returns gpio pin state. ? logic 1 = gpio interrupt is generated when this input pin transitions from high to low. rd gpio lvl returns inverted gpio pin state. 3.24 gpio select register (gpiosel) - read/write this register selects where a gpio is an input or an output. ? logic 0 = gpio is an output. ? logic 1 = gpio is an input (default).
t able 21: uart reset conditions dlm, dll (both tx and rx) dlm = 0x00 and dll = 0x01. only resets to these values during a power up. they do not reset when the reset pin is asserted. dld bits 7-0 = 0x00 rhr bits 7-0 = 0xxx thr bits 7-0 = 0xxx ier bits 7-0 = 0x00 fcr bits 7-0 = 0x00 isr bits 7-0 = 0x01 lcr bits 7-0 = 0x00 mcr bits 7-0 = 0x00 lsr bits 7-0 = 0x60 shr bits 7-0 = 0x00 msr bits 7-0 =0xx0 (bits 7-4 = complement of modem inputs) sfr bits 7-0 = 0x00 spr bits 7-0 = 0xff gpiolvl bits 7-0 = 0x00 emsr bits 7-0 = 0x00 fc bits 7-0 = 0x00 trg bits 7-0 = 0x01 fctr bits 7-0 = 0x00 efr bits 7-0 = 0x00 xon1 bits 7-0 = 0x00 xon2 bits 7-0 = 0x00 xoff1 bits 7-0 = 0x00 xoff2 bits 7-0 = 0x00 gpioint bits 7-0 = 0x00 gpio3t bits 7-0 = 0x00 gpioinv bits 7-0 = 0x00 gpiosel bits 7-0 = 0xff i/o signals reset state tx high rts# high dtr# high irq# high XR20M1280 49 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters registers reset state
absolute maximum ratings power supply range 3.63 volts voltage at any pin gnd-0.3 v to 3.6 v operating temperature -40 o to +85 o c storage temperature -65 o to +150 o c package dissipation 500 mw typical package thermal resistance data (margin of error: 15%) thermal resistance (24-qfn) theta-ja = 38 o c/w, theta-jc = 26 o c/w thermal resistance (32-qfn) theta-ja = 33 o c/w, theta-jc = 22 o c/w thermal resistance (40-qfn) theta-ja = 32 o c/w, theta-jc = 16 o c/w electrical characteristics XR20M1280 50 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 dc electrical characteristics u nless otherwise noted : ta = -40 o to +85 o c, vcc_ xxxx is 1.62 to 3.63v s ymbol p arameter l imits 1.8v m in m ax l imits 2.5v m in m ax l imits 3.3v m in m ax u nits c onditions v ilck clock input low level -0.3 0.2 -0.3 0.4 -0.3 0.6 v (xtal1 input) v ihck clock input high level 1.4 vcc_ core 2.0 vcc_ core 2.4 vcc_ core v v il input low voltage -0.3 0.2 -0.3 0.5 -0.3 0.7 v v ih input high voltage 1.4 5.5 1.8 5.5 2.0 5.5 v v ol output low voltage 0.4 0.4 0.4 v v v i ol = 6 ma i ol = 4 ma i ol = 1.5 ma v oh output high voltage 1.4 1.8 2.0 v v v i oh = -4 ma i oh = -2 ma i oh = -200 ua v sil sda & scl pin input low voltage -0.3 0.48 -0.3 0.75 -0.3 1.08 v v sih sda & scl pin input high voltage 1.12 5.5 1.6 5.5 2.0 5.5 v v s ol sda output low voltage 0.32 0.4 0.4 v v v i ol = 4 ma i ol = 3 ma i ol = 3 ma i il input low leakage current 15 15 15 ua i ih input high leakage current 15 15 15 ua
XR20M1280 51 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters test 1: all inputs should remain steady at vcc or gnd to minimi ze sleep current. rx input must idle at high while asleep. ac electrical characteristics o to +85 o c, vcc_ xxxx is 1.62 to 3.63v, 70 p f load where applicable s ymbol p arameter l imits 10% m in m ax l imits 10% m in m ax l imits 10% m in m ax u nit xtal1 uart crystal frequency 24 24 24 mhz eclk external clock frequency 40 64 96 mhz t eclk external clock time period 12 7 5 ns f igure 21. c lock t iming osc clk clk external clock c in input pin capacitance 5 5 5 pf i cc power supply current 2 3 4 ma ext clk = 5mhz i sleep sleep current 5 10 20 ua see test 1 ta = -40 1.8v 2.5v 3.3v dc electrical characteristics u nless otherwise noted : ta = -40 o to +85 o c, vcc_ xxxx is 1.62 to 3.63v s ymbol p arameter l imits 1.8v m in m ax l imits 2.5v m in m ax l imits 3.3v m in m ax u nits c onditions
ac electrical characte ristics - i2c-bus timing specifications unless otherwise noted: ta=-40 o to +85 o c, vcc_xxxx = 1.62 - 3.63v s ymbol p arameter s tandard m ode i2c-b us m in m ax f ast m ode i2c-b us m in m ax u nit f scl operating frequency 0 100 0 400 khz t buf bus free time between stop and start 4.7 1.3 p s t hd;sta start condition hold time 4.0 0.6 p s t su;sta start condition setup time 4.7 0.6 p s t hd;dat data hold time 0 0 ns t vd;ack data valid acknowledge 0.6 0.6 p s t vd;dat scl low to data out valid 0.6 0.6 ns t su;dat data setup time 250 150 ns t low clock low period 4.7 1.3 p s t high clock high period 4.0 0.6 p s t f clock/data fall time 300 300 ns t r clock/data rise time 1000 300 ns t sp pulse width of spikes tolerance 0.5 0.5 p s t d1 i 2 c-bus gpio output valid 0.2 0.2 p s t d2 i 2 c-bus modem input interrupt valid 0.2 0.2 p s t d3 i 2 c-bus modem input interrupt clear 0.2 0.2 p s t d4 i 2 c input pin interrupt valid 0.2 0.2 p s t d5 i 2 c input pin interrupt clear 0.2 0.2 p s t d6 i 2 c-bus receive interrupt valid 0.2 0.2 p s t d7 i 2 c-bus receive interrupt clear 0.2 0.2 p s t d8 i 2 c-bus transmit interrupt clear 1.0 0.5 p s t d15 scl delay after reset 3 3 p s XR20M1280 52 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0
f igure 22. i c-b us t iming d iagram start condition (s) bit 7 msb (a7) bit 6 (a6) protocol t buf t r t su;sta t low t high 1/f scl t f scl t hd;sta t su;dat t hd;dat sda bit 0 lsb (r/w) acknowledge (a) stop condition (p) t vd;dat t sp t vd;ack t su;sto f igure 23. w rite t o o utput slave address w a gpiolvl reg. a data a sda gpion t d1 XR20M1280 53 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters 2
f igure 24. m odem i nput p in i nterrupt slave address w a msr register a data a sda irq# t d3 ra slave address s modem pin t d2 f igure 25. gpio p in i nterrupt slave address wa gpiolvl reg. a data a sda irq # t d5 ra slave address s gpion t d4 p ack from slave ack from slave ack from master XR20M1280 54 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0
f igure 26. r eceive i nterrupt d0 d1 d2 d3 d4 d5 d6 d7 start bit stop bit next start bit t d6 rx irq# f igure 27. r eceive i nterrupt c lear slave address w a rhr a data a sda irq# t d7 ra slave address s p f igure 28. t ransmit i nterrupt c lear slave address w a thr register a data a sda irq# t d8 a data XR20M1280 55 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters
ac electrical characte ristics - spi-bus timing specifications unless otherwise noted: ta=-40 o to +85 o c, vcc=1.62 - 3.63v s ymbol p arameter m in m ax u nit c onditions f scl operating frequency 26 mhz t tr cs# high to so three-state time 100 ns c l = 15 pf t css cs# to scl setup time 25 ns t csh cs# to scl hold time 20 ns t do scl fall to so valid time 100 ns c l = 15 pf t ds si to scl setup time 10 ns t dh si to scl hold time 10 ns t cp scl period 40 ns t ch + t cl t ch scl high time 20 ns t cl scl low time 20 ns t csw cs# high pulse width 25 ns t d9 spi output data valid 200 ns t d10 spi modem output data valid 200 ns t d11 spi transmit interrupt clear 200 ns t d12 spi modem input interrupt clear 200 ns t d13 spi input pin interrupt clear 200 ns t d14 spi receive interrupt clear 200 ns f igure 29. spi-b us t iming t csh t css t ds t dh t cl t ch cs# scl si so ... ... ... ... t csh t csw t do t tr XR20M1280 56 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0
f igure 30. spi w rite mcr to dtr o utput s witch a3 a2 a1 r/w a0ch1ch0x d7d6d5d4d3d2d1d0 cs# sclk si gpiox t d9 f igure 31. spi w rite mcr to dtr o utput s witch a3 a2 a1 r/w a0 ch1 ch0 x d7 d6 d5 d4 d3 d2 d1 d0 cs# sclk si dtr# (gpio5) t d10 XR20M1280 57 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters
f igure 32. spi w rite thr to c lear tx int a3 a2 a1 r/w a0ch1ch0x d7d6d5d4d3d2d1d0 cs# sclk si gpiox td11 irq# f igure 33. r ead msr to c lear m odem int a3 a2 a1 r/w a0 ch1 ch0 x d7 d6 d5 d4 d3 d2 d1 d0 cs# sclk si so t d12 irq# XR20M1280 58 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0
f igure 34. r ead gpiolvl to c lear gpio int a3 a2 a1 r/w a0 ch1 ch0 x d7 d6 d5 d4 d3 d2 d1 d0 cs# sclk si so t d13 irq# f igure 35. r ead rhr to c lear rx int a3 a2 a1 r/w a0 ch1 ch0 x d7 d6 d5 d4 d3 d2 d1 d0 cs# sclk si so t d14 irq# XR20M1280 59 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters
package dimensions (24 pin qfn - 4 x 4 x 0.9 mm ) note: the actual center pad is metallic and the size (d2) is device-dependent with a typical tolerance of 0.3mm note: the control dimension is in millimeter. a 0.031 0.039 0.80 1.00 a1 0.000 0.002 0.00 0.05 a3 0.006 0.010 0.15 0.25 d 0.154 0.161 3.90 4.10 d2 0.098 0.110 2.50 2.80 b 0.007 0.012 0.18 0.30 e 0.0197 bsc 0.50 bsc l 0.014 0.018 0.35 0.45 k 0.008 - 0.20 - XR20M1280 60 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 inches millimeters symbol min max min max
package dimensions (32 pin qfn - 5 x 5 x 0.9 mm ) note: the actual center pad is metallic and the size (d2) is device-dependent with a typical tolerance of 0.3mm note: the control dimension is in millimeter. inches millimeters symbol min max min max a 0.031 0.039 0.80 1.00 a1 0.000 0.002 0.00 0.05 a3 0.006 0.010 0.15 0.25 d 0.193 0.201 4.90 5.10 d2 0.138 0.150 3.50 3.80 b 0.007 0.012 0.18 0.30 e 0.0197 bsc 0.50 bsc l 0.012 0.020 0.35 0.45 k 0.008 - 0.20 - XR20M1280 61 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters
package dimensions (40 pin qfn - 6 x 6 x 0.9 mm ) note: the actual center pad is metallic and the size (d2) is device-dependent with a typical tolerance of 0.3mm note: the control dimension is in millimeter. a 0.031 0.039 0.80 1.00 a1 0.000 0.002 0.00 0.05 a3 0.006 0.010 0.15 0.25 d 0.232 0.240 5.90 6.10 d2 0.189 0.197 4.80 5.00 b 0.007 0.012 0.18 0.30 e 0.0197 bsc 0.50 bsc l 0.014 0.018 0.35 0.45 k 0.008 - 0.20 - XR20M1280 62 i2c/spi uart with 128-byte fi fo and integrated level shifters rev. 1.0.0 inches millimeters symbol min max min max
revision history d ate r evision d escription may 2011 1.0.0 final datasheet. 63 notice exar corporation reserves the right to make changes to the products contained in this publicat ion in order to improve design, performanc e or reliability. exar corp oration assumes no responsibility for the use of any circuits described herein, conveys no license under any patent or other right, and makes no representation that the circuits are free of patent in fringement. charts and sc hedules contained here in are only for illustration purposes and may vary depending upon a user?s specific application. while the information in this publication has been carefully ch ecked; no responsibility, however , is assumed for inaccuracies. exar corporation does not re commend the use of any of its products in life suppo rt applications where the failure or malfunction of the product can reasonably be ex pected to cause failure of the life support system or to significantly affect its safety or effectiveness. products ar e not authorized for use in such applications unless exar corporation receives , in writing, assurances to its satisfaction that: (a) the ri sk of injury or damage has been minimized; (b) the us er assumes all such risks; (c) potential liability of exar corporation is adequately protected under the circumstances. copyright 2011 exar corporation datasheet may 2011. send your uart technical inquiry with technical details to hotline: uarttechsupport@exar.com . reproduction, in part or whole, without the prior written consent of exar co rporation is prohibited. XR20M1280 rev. 1.0.0 i2c/spi uart with 128-byte fi fo and integrated level shifters


▲Up To Search▲   

 
Price & Availability of XR20M1280

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X